1. Jul 24, 2019
    • Thomas Preud'homme's avatar
      [FileCheck]] Canonicalize caret location testing · a83dfd92
      Thomas Preud'homme authored
      Summary:
      Testing of caret location in diagnostic message is currently made with
      CHECK directive with the following general format:
      CHECK: {{^         \^$}}
      
      James Henderson suggested the following would be more readable:
      CHECK: {{^}}         ^{{$}}
      
      and when whole lines can be matched (as is the case for command-line
      testing where error messages do not include path):
      CHECK:         ^
      using the option --match-full-lines.
      
      This commit implements these 2 changes on all existing caret position
      tests. It also aligns the caret to the character it is trying to match
      in the above line.
      
      Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
      
      Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64923
      
      > llvm-svn: 366861
      
      llvm-svn: 366898
      a83dfd92
    • Thomas Preud'homme's avatar
      FileCheck [8/12]: Define numeric var from expr · 4cd9b853
      Thomas Preud'homme authored
      Summary:
      This patch is part of a patch series to add support for FileCheck
      numeric expressions. This specific patch lift the restriction for a
      numeric expression to either be a variable definition or a numeric
      expression to try to match.
      
      This commit allows a numeric variable to be set to the result of the
      evaluation of a numeric expression after it has been matched
      successfully. When it happens, the variable is allowed to be used on
      the same line since its value is known at match time.
      
      It also makes use of this possibility to reuse the parsing code to
      parse a command-line definition by crafting a mirror string of the
      -D option with the equal sign replaced by a colon sign, e.g. for option
      '-D#NUMVAL=10' it creates the string
      '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression
      is parsed to define NUMVAL. This result in a few tests needing updating
      for the location diagnostics on top of the tests for the new feature.
      
      It also enables empty numeric expression which match any number without
      defining a variable. This is done here rather than in commit #5 of the
      patch series because it requires to dissociate automatic regex insertion
      in RegExStr from variable definition which would make commit #5 even
      bigger than it already is.
      
      Copyright:
          - Linaro (changes up to diff 183612 of revision D55940)
          - GraphCore (changes in later versions of revision D55940 and
                       in new revision created off D55940)
      
      Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
      
      Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60388
      
      > llvm-svn: 366860
      
      llvm-svn: 366897
      4cd9b853
    • George Rimar's avatar
      [llvm-objdump] - Import the test/Object/X86/no-start-symbol.test test case and... · 7d79b552
      George Rimar authored
      [llvm-objdump] - Import the test/Object/X86/no-start-symbol.test test case and rewrite it to use YAML.
      
      This patch removes test/Object/X86/no-start-symbol.test (rewrites
      it to use YAML and moves it to llvm-objdump tests folder).
      
      (This test was initially introduced in rL239039, but now there
      is no reason to keep the precompiled binary it seems).
      
      DIfferential revision: https://reviews.llvm.org/D65136
      
      llvm-svn: 366896
      7d79b552
    • George Rimar's avatar
      [Object/llvm-readobj] - Cleanup testing of the dynamic objects. · cb487e9b
      George Rimar authored
      This patch touches a few test cases:
      
      It removes dtflags.elf-x86-64 binary and elf-dtflags.test.
      elf-dtflags.test is excessive because we have the
      elf-dynamic-tags.test which test all non-machine specific tags.
      
      It removes testing of --dynamic-table from test\Object\readobj-shared-object.test
      (we have the elf-dynamic-tags.test for that), and simplifies this test case.
      
      It moves testing of the headers from readobj-shared-object.test
      to elf-file-headers.test.
      
      Adds test/tools/llvm-readobj/elf-file-types.test and test/tools/llvm-readobj/elf-loadname.test.
      
      It opens road for removing the readobj-shared-object.test completely soon.
      
      Differential revision: https://reviews.llvm.org/D65068
      
      llvm-svn: 366895
      cb487e9b
    • George Rimar's avatar
      [yaml2obj] - Allow custom fields for the SHT_UNDEF sections. · 242da4e8
      George Rimar authored
      This is a follow-up refactoring patch for recently
      introduced functionality which which reduces the code duplication
      and also makes possible to redefine all possible fields of
      the first SHT_NULL section (previously it was only possible to set
      sh_link and sh_size).
      
      Differential revision: https://reviews.llvm.org/D65140
      
      llvm-svn: 366894
      242da4e8
    • Sam McCall's avatar
      [clangd] SelectionTree treats TranslationUnitDecl (mostly) consistently with other containers. · bdc6b6e4
      Sam McCall authored
      Summary:
      Previously TranslationUnitDecl would never be selected.
      This means root() is never null, and returns a reference.
      
      commonAncestor() is in principle never null also, but returning TUDecl
      here requires tweaks to be careful not to traverse it (this was already
      possible when selecting multiple top-level decls, and there are associated bugs!)
      Instead, never allow commonAncestor() to return TUDecl, return null instead.
      
      Reviewers: hokein
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D65101
      
      llvm-svn: 366893
      bdc6b6e4
    • Raphael Isemann's avatar
      [lldb] Fix build errors from tablegenify platform commit · aaad1a89
      Raphael Isemann authored
      Forgot to stage some changes...
      
      llvm-svn: 366892
      aaad1a89
    • Raphael Isemann's avatar
      [lldb][NFC] Tablegenify platform · 2359fecf
      Raphael Isemann authored
      llvm-svn: 366891
      2359fecf
    • David Green's avatar
      [ARM] MVE predicate register support · c7e55d4f
      David Green authored
      This adds support code for building and shuffling i1 predicate registers. It
      generally uses two basic principles, either converting the predicate into an
      scalar (through a PREDICATE_CAST) and doing scalar operations on it there, or
      by converting the register to an full vector register and back.
      
      Some of the code here is a not super efficient but will hopefully cover most
      cases of moving i1 vectors around and can be improved in subsequent patches.
      
      Some code by David Sherwood.
      
      Differential Revision: https://reviews.llvm.org/D65052
      
      llvm-svn: 366890
      c7e55d4f
    • Michal Gorny's avatar
      Revert "Revert "[lldb] [Process/NetBSD] Fix constructor after r363707"" · b09bc8a2
      Michal Gorny authored
      The relevant changes have been reapplied, and broke build again.
      
      llvm-svn: 366889
      b09bc8a2
    • Simon Atanasyan's avatar
      [mips] Assign R_TLS type to the R_MIPS_TLS_TPREL_XXX relocations. NFC · 5adbfdda
      Simon Atanasyan authored
      That allows to remove duplicated code which subtracts 0x7000 from the
      R_MIPS_TLS_TPREL_XXX relocations values in the `MIPS::relocateOne`
      function.
      
      llvm-svn: 366888
      5adbfdda
    • Igor Kudrin's avatar
      [DWARF][NFC] Add constants for reserved values of an initial length field. · 3daefb07
      Igor Kudrin authored
      Differential Revision: https://reviews.llvm.org/D65039
      
      llvm-svn: 366887
      3daefb07
    • George Rimar's avatar
      Recommit rr366796 "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections()." · ec10d5c6
      George Rimar authored
      With a fix of the issue found by UBSan.
      
      Original commit message:
      
      This eliminates a one error untested and
      also introduces a error for one more possible case
      which lead to crash previously.
      
      Differential revision: https://reviews.llvm.org/D64987
      
      llvm-svn: 366886
      ec10d5c6
    • David Green's avatar
      [ARM] MVE integer compares and selects · b9d96cec
      David Green authored
      This adds the very basics for MVE vector predication, adding integer VCMP and
      VSEL instruction support. This is done through predicate registers (MVT::v16i1,
      MVT::v8i1, MVT::v4i1), but otherwise using same mechanics as NEON to custom
      lower setcc's through ARMISD::VCXX nodes (VCEQ, VCGT, VCEQZ, etc).
      
      An extra VCNE was added, as this can be handled sensibly by MVE's expanded
      number of VCMP condition codes. (There are also VCLE and VCLT which are added
      later).
      
      VPSEL is also added here, simply selecting on the vselect.
      
      Original code by David Sherwood.
      
      Differential Revision: https://reviews.llvm.org/D65051
      
      llvm-svn: 366885
      b9d96cec
    • Balazs Keri's avatar
      [CrossTU] Add a function to retrieve original source location. · d22f8773
      Balazs Keri authored
      Summary:
      A new function will be added to get the original SourceLocation
      for a SourceLocation that was imported as result of getCrossTUDefinition.
      The returned SourceLocation is in the context of the (original)
      SourceManager for the original source file. Additionally the
      ASTUnit object for that source file is returned. This is needed
      to get a SourceManager to operate on with the returned source location.
      
      The new function works if multiple different source files are loaded
      with the same CrossTU context.
      
      Reviewers: martong, shafik
      
      Reviewed By: martong
      
      Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D65064
      
      llvm-svn: 366884
      d22f8773
    • Fangrui Song's avatar
      [Format] getFormattingLangOpts: make LS_Auto uses LS_Cpp11 lexing rule · 5a43ba8a
      Fangrui Song authored
      Suggested by sammccall in post-commit review of D65183
      
      Reviewed By: sammccall
      
      Differential Revision: https://reviews.llvm.org/D65194
      
      llvm-svn: 366883
      5a43ba8a
    • Sam McCall's avatar
      [clangd] Fix SelectionTree traversal of qualified types · 2ff40ca3
      Sam McCall authored
      Summary:
      QualifiedTypeLoc isn't treated like a regular citizen by RecursiveASTVisitor.
      This meant we weren't intercepting the traversal of its inner TypeLoc.
      
      Most of the changes here are about exposing kind() so we can improve the
      precision of our tests.
      
      This should fix the issue raised in D65067.
      
      Reviewers: hokein
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D65100
      
      llvm-svn: 366882
      2ff40ca3
    • Sam Parker's avatar
      [ARM][ParallelDSP] Fix pointer operand reordering · aeb21b96
      Sam Parker authored
          
      While combining two loads into a single load, we often need to
      reorder the pointer operands for the new load. This reordering was
      broken in the cases where there was a chain of values that built up
      the pointer.
      
      Differential Revision: https://reviews.llvm.org/D65193
      
      llvm-svn: 366881
      aeb21b96
    • Sam McCall's avatar
      [clangd] Reformat use of cl::opt: use unqualified name and don't bin-pack attributes. NFC · 6076788c
      Sam McCall authored
      Reviewers: kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D65154
      
      llvm-svn: 366880
      6076788c
    • Stefan Granitz's avatar
      [lldb] Remove Xcode project legacy · 7e6f355b
      Stefan Granitz authored
      Summary: Since D65109 removed the manually maintained Xcode project, there's a few things we don't need anymore. Anything here we should keep or anything more to remove?
      
      Reviewers: JDevlieghere, jasonmolenda, clayborg, jingham, lanza, teemperor
      
      Subscribers: mgorny, lldb-commits, #lldb
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D65155
      
      llvm-svn: 366879
      7e6f355b
    • Sander de Smalen's avatar
      [SVE][Inline-Asm] Add support to specify SVE registers in the clobber list · 2b290885
      Sander de Smalen authored
      Adds the SVE vector and predicate registers to the list of known registers.
      
      Patch by Kerry McLaughlin.
      
      Reviewers: erichkeane, sdesmalen, rengolin
      
      Reviewed By: sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D64739
      
      llvm-svn: 366878
      2b290885
    • Haojian Wu's avatar
      [clangd] Bump vscode-clangd v0.0.16 · ec4d8cdd
      Haojian Wu authored
      CHANGELOG:
      - detect C++ language based on some well-known file paths
      - upgrade the lsp-client and lsp-server dependencies
      
      llvm-svn: 366877
      ec4d8cdd
    • Fangrui Song's avatar
      [Format] Make it easy to add new format::FormatStyle::LanguageStandard. NFCI · 00e8ac3b
      Fangrui Song authored
      Preparatory change for D65043.
      
      We current use `!=LS_Cpp03` to enable language standards 11,14,17, and
      2a. `>=LS_Cpp11` is better if we decide to add new LanguageStandard in
      the future.
      
      Reviewed By: sammccall
      
      Differential Revision: https://reviews.llvm.org/D65183
      
      llvm-svn: 366876
      00e8ac3b
    • Haojian Wu's avatar
      [clangd] Update a stale comment, NFC. · 0e7bbb11
      Haojian Wu authored
      llvm-svn: 366875
      0e7bbb11
    • Haojian Wu's avatar
      [Remark] Suppress the "-Wreturn-type" compiler warning, NFC · 509ad30d
      Haojian Wu authored
      llvm-svn: 366874
      509ad30d
    • Haojian Wu's avatar
      [clangd] Implement "prepareRename" · f429ab60
      Haojian Wu authored
      Summary:
      - "prepareRename" request is added in LSP v3.12.0
      - also update the vscode-client dependency to pick-up the rename bug fix[1]
      
      [1]: https://github.com/microsoft/vscode-languageserver-node/issues/447
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63126
      
      llvm-svn: 366873
      f429ab60
    • Thomas Preud'homme's avatar
      Revert "FileCheck [8/12]: Define numeric var from expr" · 5ecb8802
      Thomas Preud'homme authored
      This reverts commit 1b059775.
      
      llvm-svn: 366872
      5ecb8802
    • Thomas Preud'homme's avatar
      Revert "[FileCheck]] Canonicalize caret location testing" · 75299de1
      Thomas Preud'homme authored
      This reverts commit ba4e8d79.
      
      llvm-svn: 366871
      75299de1
    • Thomas Preud'homme's avatar
      Revert "[FileCheck] Use ASSERT for fatal unit tests" · 00c8dab2
      Thomas Preud'homme authored
      This reverts commit fb596735.
      
      llvm-svn: 366870
      00c8dab2
    • Shaurya Gupta's avatar
      [Clangd] Fixed ExtractVariable for certain types of Exprs · b0ed5bea
      Shaurya Gupta authored
      Summary:
      
      - Modified ExtractVariable for extraction of MemberExpr, DeclRefExpr and Assignment Expr
      - Removed extraction from label statements.
      - Fixed unittests
      
      Reviewers: sammccall, kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D64717
      
      llvm-svn: 366869
      b0ed5bea
    • Roger Ferrer Ibanez's avatar
      [RISCV] Implement benchmark::cycleclock::Now · 09e63044
      Roger Ferrer Ibanez authored
      This is a cherrypick of D64237 onto llvm/utils/benchmark and
      libcxx/utils/google-benchmark.
      
      Differential Revision: https://reviews.llvm.org/D65142
      
      llvm-svn: 366868
      09e63044
    • Chen Zheng's avatar
      8b7e82be
    • Fangrui Song's avatar
    • Petr Hosek's avatar
      [SafeStack] Insert the deref before remaining elements · 8b161bac
      Petr Hosek authored
      This is a follow up to D64971. While we need to insert the deref after
      the offset, it needs to come before the remaining elements in the
      original expression since the deref needs to happen before the LLVM
      fragment if present.
      
      Differential Revision: https://reviews.llvm.org/D65172
      
      llvm-svn: 366865
      8b161bac
    • Francis Visoiu Mistrih's avatar
      [Remarks] String tables should be move-only · 4287c95b
      Francis Visoiu Mistrih authored
      Copying them is expensive. This allows the tables to be moved around at
      lower cost, and allows a remarks::StringTable to be constructed from
      a remarks::ParsedStringTable.
      
      llvm-svn: 366864
      4287c95b
    • Jonas Devlieghere's avatar
      [lldb] Fix enum value description · 1cb102ca
      Jonas Devlieghere authored
      llvm-svn: 366863
      1cb102ca
    • Thomas Preud'homme's avatar
      [FileCheck] Use ASSERT for fatal unit tests · fb596735
      Thomas Preud'homme authored
      Summary:
      A number of EXPECT statements in FileCheck's unit tests are dependent
      from results of other values being tested. This commit changes those
      earlier test to use ASSERT instead of EXPECT to avoid cascade errors
      when they are all related to the same issue.
      
      Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
      
      Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64921
      
      llvm-svn: 366862
      fb596735
    • Thomas Preud'homme's avatar
      [FileCheck]] Canonicalize caret location testing · ba4e8d79
      Thomas Preud'homme authored
      Summary:
      Testing of caret location in diagnostic message is currently made with
      CHECK directive with the following general format:
      CHECK: {{^         \^$}}
      
      James Henderson suggested the following would be more readable:
      CHECK: {{^}}         ^{{$}}
      
      and when whole lines can be matched (as is the case for command-line
      testing where error messages do not include path):
      CHECK:         ^
      using the option --match-full-lines.
      
      This commit implements these 2 changes on all existing caret position
      tests. It also aligns the caret to the character it is trying to match
      in the above line.
      
      Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
      
      Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64923
      
      llvm-svn: 366861
      ba4e8d79
    • Thomas Preud'homme's avatar
      FileCheck [8/12]: Define numeric var from expr · 1b059775
      Thomas Preud'homme authored
      Summary:
      This patch is part of a patch series to add support for FileCheck
      numeric expressions. This specific patch lift the restriction for a
      numeric expression to either be a variable definition or a numeric
      expression to try to match.
      
      This commit allows a numeric variable to be set to the result of the
      evaluation of a numeric expression after it has been matched
      successfully. When it happens, the variable is allowed to be used on
      the same line since its value is known at match time.
      
      It also makes use of this possibility to reuse the parsing code to
      parse a command-line definition by crafting a mirror string of the
      -D option with the equal sign replaced by a colon sign, e.g. for option
      '-D#NUMVAL=10' it creates the string
      '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression
      is parsed to define NUMVAL. This result in a few tests needing updating
      for the location diagnostics on top of the tests for the new feature.
      
      It also enables empty numeric expression which match any number without
      defining a variable. This is done here rather than in commit #5 of the
      patch series because it requires to dissociate automatic regex insertion
      in RegExStr from variable definition which would make commit #5 even
      bigger than it already is.
      
      Copyright:
          - Linaro (changes up to diff 183612 of revision D55940)
          - GraphCore (changes in later versions of revision D55940 and
                       in new revision created off D55940)
      
      Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
      
      Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60388
      
      llvm-svn: 366860
      1b059775
    • Jonas Devlieghere's avatar
      [DWARF] Use 32-bit format specifier for offset · f8552e67
      Jonas Devlieghere authored
      This should fix PR42730.
      
      llvm-svn: 366859
      f8552e67