1. Jun 25, 2019
    • Fangrui Song's avatar
      807d2f44
    • Simon Pilgrim's avatar
      [TargetLowering] SimplifyDemandedBits - add ANY_EXTEND_VECTOR_INREG support · 1a18bb6f
      Simon Pilgrim authored
      Add 'lowest' demanded elt -> bitcast fold to all *_EXTEND_VECTOR_INREG cases.
      
      Reapplies rL363856.
      
      llvm-svn: 364311
      1a18bb6f
    • Whitney Tsang's avatar
      Expand cloneLoopWithPreheader() to support cloning loop nest · 7c1deeff
      Whitney Tsang authored
      Summary: cloneLoopWithPreheader() currently only support innermost loop,
      and assert otherwise.
      Reviewers: Meinersbur, fhahn, kbarton
      Reviewed By: Meinersbur
      Subscribers: hiraditya, jsji, llvm-commits
      Tag: LLVM
      Differential Revision: https://reviews.llvm.org/D63446
      
      llvm-svn: 364310
      7c1deeff
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Fix duplicated test · dcd8b72e
      Matt Arsenault authored
      Somehow ended up with copies of the same tests in AMDGPU and
      AMDGPU/GlobalISel
      
      llvm-svn: 364309
      dcd8b72e
    • Matt Arsenault's avatar
      AMDGPU: Select G_SEXT/G_ZEXT/G_ANYEXT · d7ffa2a9
      Matt Arsenault authored
      llvm-svn: 364308
      d7ffa2a9
    • James Henderson's avatar
      083d9490
    • James Henderson's avatar
      [docs][llvm-readobj] Improve llvm-readobj documentation · b96d9d8b
      James Henderson authored
      There were a number of issues with the llvm-readobj documentation. The
      following points were raised in https://bugs.llvm.org/show_bug.cgi?id=42255,
      and have been fixed in this patch:
      
       1. The description section claimed "The tool and its output is
          primarily designed for use in FileCheck-based tests" which is not
          really the case any more.
       2. The documentation used single-dash long options for option names,
          but references in the help text to other options exclusively used
          double-dashes. Fixed by standardising on double-dashes for all
          long-form options.
       3. The majority of options available and in the help text were not
          present in the documentation. This patch adds them.
       4. Several aliases, both long and short, were missing, e.g. --relocs.
      
      Additionally, this patch improves the documentation by:
      
       1. Splitting the options into categories based on the file format they
          are specific to.
       2. Updating the Exit Status section to correctly mention that errors
          lead to a non-zero exit code.
       3. Adding a See Also section referencing other similar LLVM tools.
       4. Improving/correcting some of the descriptions of options that did
          not quite match up with what llvm-readobj does.
      
      Reviewed by: peter.smith, MaskRay, mtrent
      
      Differential Revision: https://reviews.llvm.org/D63719
      
      llvm-svn: 364306
      b96d9d8b
    • Simon Tatham's avatar
      [ARM] Re-enable misspelled RUN: lines in fullfp16.s. · ec18f0f6
      Simon Tatham authored
      rL364293 committed a couple of lines that just said "// RUN llvm-mc ..."
      without the all-important ':' after RUN, so those test lines weren't
      actually running anything.
      
      llvm-svn: 364305
      ec18f0f6
    • Matt Arsenault's avatar
      AMDGPU: Make amdgcn.s.get.waveid.in.workgroup inaccessiblememonly · d1dc1f49
      Matt Arsenault authored
      This should probably be readnone, even though the instruction looks
      like a load.
      
      llvm-svn: 364304
      d1dc1f49
    • Simon Pilgrim's avatar
      [TargetLowering] SimplifyDemandedBits ZERO_EXTEND_VECTOR_INREG -> ANY_EXTEND_VECTOR_INREG · 36953ce7
      Simon Pilgrim authored
      Simplify ZERO_EXTEND_VECTOR_INREG if the extended bits are not required.
      
      Matches what we already do for ZERO_EXTEND.
      
      Reapplies rL363850 but now with legality checks added at rL364290
      
      llvm-svn: 364303
      36953ce7
    • Sanjay Patel's avatar
      [SDAG] improve expansion of ctpop+setcc · e4ef6229
      Sanjay Patel authored
      This should not cause any visible change in output, but it's
      more efficient because we were producing non-canonical 'sub x, 1'
      and 'setcc ugt x, 0'. As mentioned in the TODO, we should also
      be handling the inverse predicate.
      
      llvm-svn: 364302
      e4ef6229
    • Simon Pilgrim's avatar
      Fix frame.s test dir-separator checks · 42f44b38
      Simon Pilgrim authored
      Handle / and \ separators
      
      llvm-svn: 364301
      42f44b38
    • Simon Tatham's avatar
      [ARM] Fix buildbot failure due to -Werror. · 287f0403
      Simon Tatham authored
      Including both 'case ARM_AM::uxtw' and 'default' in the getShiftOp
      switch caused a buildbot to fail with
      
      error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
      llvm-svn: 364300
      287f0403
    • Simon Pilgrim's avatar
      [TargetLowering] SimplifyDemandedBits SIGN_EXTEND_VECTOR_INREG -> ANY/ZERO_EXTEND_VECTOR_INREG · 69fc1111
      Simon Pilgrim authored
      Simplify SIGN_EXTEND_VECTOR_INREG if the extended bits are not required/known zero.
      
      Matches what we already do for SIGN_EXTEND.
      
      Reapplies rL363802 but now with legality checks added at rL364290
      
      llvm-svn: 364299
      69fc1111
    • Sjoerd Meijer's avatar
      [ARM] MVE VPT Blocks · 74ec25a1
      Sjoerd Meijer authored
      A minor iteration on the MVE VPT Block pass to enable more efficient VPT Block
      code generation: consecutive VPT predicated statements, predicated on the same
      condition, will be placed within the same VPT Block. This essentially is also
      an exercise to write some more tests for the next step, which should be more
      generic also merging instructions when they are not consecutive.
      
      Differential Revision: https://reviews.llvm.org/D63711
      
      llvm-svn: 364298
      74ec25a1
    • Nicolai Haehnle's avatar
      AMDGPU: Write LDS objects out as global symbols in code generation · 2710171a
      Nicolai Haehnle authored
      Summary:
      The symbols use the processor-specific SHN_AMDGPU_LDS section index
      introduced with a previous change. The linker is then expected to resolve
      relocations, which are also emitted.
      
      Initially disabled for HSA and PAL environments until they have caught up
      in terms of linker and runtime loader.
      
      Some notes:
      
      - The llvm.amdgcn.groupstaticsize intrinsics can no longer be lowered
        to a constant at compile times, which means some tests can no longer
        be applied.
      
        The current "solution" is a terrible hack, but the intrinsic isn't
        used by Mesa, so we can keep it for now.
      
      - We no longer know the full LDS size per kernel at compile time, which
        means that we can no longer generate a relevant error message at
        compile time. It would be possible to add a check for the size of
        individual variables, but ultimately the linker will have to perform
        the final check.
      
      Change-Id: If66dbf33fccfbf3609aefefa2558ac0850d42275
      
      Reviewers: arsenm, rampitec, t-tye, b-sumner, jsjodin
      
      Subscribers: qcolombet, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D61494
      
      llvm-svn: 364297
      2710171a
    • Nicolai Haehnle's avatar
      AMDGPU/MC: Add .amdgpu_lds directive · 08e8cb57
      Nicolai Haehnle authored
      Summary:
      The directive defines a symbol as an group/local memory (LDS) symbol.
      LDS symbols behave similar to common symbols for the purposes of ELF,
      using the processor-specific SHN_AMDGPU_LDS as section index.
      
      It is the linker and/or runtime loader's job to "instantiate" LDS symbols
      and resolve relocations that reference them.
      
      It is not possible to initialize LDS memory (not even zero-initialize
      as for .bss).
      
      We want to be able to link together objects -- starting with relocatable
      objects, but possible expanding to shared objects in the future -- that
      access LDS memory in a flexible way.
      
      LDS memory is in an address space that is entirely separate from the
      address space that contains the program image (code and normal data),
      so having program segments for it doesn't really make sense.
      
      Furthermore, we want to be able to compile multiple kernels in a
      compilation unit which have disjoint use of LDS memory. In that case,
      we may want to place LDS symbols differently for different kernels
      to save memory (LDS memory is very limited and physically private to
      each kernel invocation), so we can't simply place LDS symbols in a
      .lds section.
      
      Hence this solution where LDS symbols always stay undefined.
      
      Change-Id: I08cbc37a7c0c32f53f7b6123aa0afc91dbc1748f
      
      Reviewers: arsenm, rampitec, t-tye, b-sumner, jsjodin
      
      Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, rupprecht, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D61493
      
      llvm-svn: 364296
      08e8cb57
    • Simon Pilgrim's avatar
      [VectorLegalizer] ExpandANY_EXTEND_VECTOR_INREG/ExpandZERO_EXTEND_VECTOR_INREG... · b23c942c
      Simon Pilgrim authored
      [VectorLegalizer] ExpandANY_EXTEND_VECTOR_INREG/ExpandZERO_EXTEND_VECTOR_INREG - widen source vector
      
      The *_EXTEND_VECTOR_INREG opcodes were relaxed back around rL346784 to support source vector widths that are smaller than the output - it looks like the legalizers were never updated to account for this.
      
      This patch inserts the smaller source vector into an undef vector of the same width of the result before performing the shuffle+bitcast to correctly handle this.
      
      Part of the yak shaving to solve the crashes from rL364264 and rL364272
      
      llvm-svn: 364295
      b23c942c
    • Simon Tatham's avatar
      [ARM] Explicit lowering of half <-> double conversions. · 4cf18c28
      Simon Tatham authored
      If an FP_EXTEND or FP_ROUND isel dag node converts directly between
      f16 and f32 when the target CPU has no instruction to do it in one go,
      it has to be done in two steps instead, going via f32.
      
      Previously, this was done implicitly, because all such CPUs had the
      storage-only implementation of f16 (i.e. the only thing you can do
      with one at all is to convert it to/from f32). So isel would legalize
      the f16 into an f32 as soon as it saw it, by inserting an fp16_to_fp
      node (or vice versa), and then the fp_extend would already be f32->f64
      rather than f16->f64.
      
      But that technique can't support a target CPU which has full f16
      support but _not_ f64, such as some variants of Arm v8.1-M. So now we
      provide custom lowering for FP_EXTEND and FP_ROUND, which checks
      support for f16 and f64 and decides on the best thing to do given the
      combination of flags it gets back.
      
      Reviewers: dmgreen, samparker, SjoerdMeijer
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60692
      
      llvm-svn: 364294
      4cf18c28
    • Simon Tatham's avatar
      [ARM] Extra MVE-related testing. · d9654723
      Simon Tatham authored
      This adds some extra RUN lines to existing test files, to check that
      things that worked in previous architecture versions haven't
      accidentally stopped working in 8.1-M. Also we add some new tests: a
      test of scalar floating point instructions that could be easily
      confused with the similar-looking vector ones at assembly time, a test
      of basic load/store/move access to the FP registers (which has to work
      even in integer-only MVE); and one final check of the really obvious
      case where turning off MVE should make sure MVE instructions really
      are rejected.
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62682
      
      llvm-svn: 364293
      d9654723
    • Simon Tatham's avatar
      [ARM] Add remaining miscellaneous MVE instructions. · 86b7a1e6
      Simon Tatham authored
      This final batch includes the tail-predicated versions of the
      low-overhead loop instructions (LETP); the VPSEL instruction to select
      between two vector registers based on the predicate mask without
      having to open a VPT block; and VPNOT which complements the predicate
      mask in place.
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62681
      
      llvm-svn: 364292
      86b7a1e6
    • Simon Tatham's avatar
      [ARM] Add MVE vector load/store instructions. · e6824160
      Simon Tatham authored
      This adds the rest of the vector memory access instructions. It
      includes contiguous loads/stores, with an ordinary addressing mode
      such as [r0,#offset] (plus writeback variants); gather loads and
      scatter stores with a scalar base address register and a vector of
      offsets from it (written [r0,q1] or similar); and gather/scatters with
      a vector of base addresses (written [q0,#offset], again with
      writeback). Additionally, some of the loads can widen each loaded
      value into a larger vector lane, and the corresponding stores narrow
      them again.
      
      To implement these, we also have to add the addressing modes they
      need. Also, in AsmParser, the `isMem` query function now has
      subqueries `isGPRMem` and `isMVEMem`, according to which kind of base
      register is used by a given memory access operand.
      
      I've also had to add an extra check in `checkTargetMatchPredicate` in
      the AsmParser, without which our last-minute check of `rGPR` register
      operands against SP and PC was failing an assertion because Tablegen
      had inserted an immediate 0 in place of one of a pair of tied register
      operands. (This matches the way the corresponding check for `MCK_rGPR`
      in `validateTargetOperandClass` is guarded.) Apparently the MVE load
      instructions were the first to have ever triggered this assertion, but
      I think only because they were the first to have a combination of the
      usual Arm pre/post writeback system and the `rGPR` class in particular.
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62680
      
      llvm-svn: 364291
      e6824160
    • Simon Pilgrim's avatar
      [TargetLowering] SimplifyDemandedBits - legal checks for SIGN/ZERO_EXTEND -> ZERO/ANY_EXTEND · 49b3778e
      Simon Pilgrim authored
      As part of the fix for rL364264 + rL364272 - limit the *_EXTEND conversion to !TLO.LegalOperations || isOperationLegal cases.
      
      We'll improve X86 legality in future commits.
      
      llvm-svn: 364290
      49b3778e
    • Nemanja Ivanovic's avatar
      [PowerPC] Emit XXSEL for vec_sel and code that has the same pattern · 47b7d134
      Nemanja Ivanovic authored
      As pointed out in https://bugs.llvm.org/show_bug.cgi?id=41777
      we do not emit a vector select even when the pretty much asks for one.
      This patch changes that.
      
      Differential revision: https://reviews.llvm.org/D61658
      
      llvm-svn: 364289
      47b7d134
    • Sam Parker's avatar
      [ARM] DLS/LE low-overhead loop code generation · a6fd919c
      Sam Parker authored
      Introduce three pseudo instructions to be used during DAG ISel to
      represent v8.1-m low-overhead loops. One maps to set_loop_iterations
      while loop_decrement_reg is lowered to two, so that we can separate
      the decrement and branching operations. The pseudo instructions are
      expanded pre-emission, where we can still decide whether we actually
      want to generate a low-overhead loop, in a new pass:
      ARMLowOverheadLoops. The pass currently bails, reverting to an sub,
      icmp and br, in the cases where a call or stack spill/restore happens
      between the decrement and branching instructions, or if the loop is
      too large.
      
      Differential Revision: https://reviews.llvm.org/D63476
      
      llvm-svn: 364288
      a6fd919c
    • James Henderson's avatar
      [docs][llvm-cxxfilt] Write llvm-cxxfilt documentation · ecd9348a
      James Henderson authored
      There was a stub for llvm-cxxfilt, but it didn't describe the options.
      Additionally, it was in markdown, which was causing issues, so as
      discussed in https://reviews.llvm.org/D63211, this change replaces the
      existing stub with an RST file.
      
      Reviewed by: MaskRay, mattd
      
      Differential Revision: https://reviews.llvm.org/D63722
      
      llvm-svn: 364287
      ecd9348a
    • Roman Lebedev's avatar
      [Codegen] TargetLowering::SimplifySetCC(): omit urem when possible · cdd43eac
      Roman Lebedev authored
      Summary:
      This addresses the regression that is being exposed by D50222 in `test/CodeGen/X86/jump_sign.ll`
      The missing fold, at least partially, looks trivial:
      https://rise4fun.com/Alive/Zsln
      i.e. if we are comparing with zero, and comparing the `urem`-by-non-power-of-two,
      and the `urem` is of something that may at most have a single bit set (or no bits set at all),
      the `urem` is not needed.
      
      Reviewers: RKSimon, craig.topper, xbolva00, spatel
      
      Reviewed By: xbolva00, spatel
      
      Subscribers: xbolva00, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63390
      
      llvm-svn: 364286
      cdd43eac
    • Nico Weber's avatar
      Port r363962 to COFF: Deduplicate undefined symbol diagnostics · 0142b9ce
      Nico Weber authored
      lld/coff already deduplicated undefined symbols on a TU level: It would
      group all references to a symbol from a single TU. This makes it so that
      references from all TUs to a single symbol are grouped together.
      
      Since lld/coff almost did what I thought it did already, the patch is
      much smaller than the elf version. The only not local change is that
      getSymbolLocations() now returns a vector<string> instead of a string,
      so that the undefined symbol reporting code can know how many references
      to a symbol exist in a given TU.
      
      Fixes PR42260 for lld/coff.
      
      Differential Revision: https://reviews.llvm.org/D63646
      
      llvm-svn: 364285
      0142b9ce
    • Sam McCall's avatar
      [clangd] Fix NestedNameSpecifierLoc in SelectionTree · 79f7831a
      Sam McCall authored
      Reviewers: kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63708
      
      llvm-svn: 364284
      79f7831a
    • Haojian Wu's avatar
      [clangd] Narrow rename to local symbols. · 7276a446
      Haojian Wu authored
      Summary:
      Previously, we performed rename for all kinds of symbols (local, global).
      
      This patch narrows the scope by only renaming symbols not being used
      outside of the main file (with index asisitance). Renaming global
      symbols is not supported at the moment (return an error).
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63426
      
      llvm-svn: 364283
      7276a446
    • George Rimar's avatar
      [yaml2obj/obj2yaml] - Allow having the symbols and sections with duplicated names. · 60dc5d4b
      George Rimar authored
      The patch teaches yaml2obj/obj2yaml to support parsing/dumping
      the sections and symbols with the same name.
      A special suffix is added to a name to make it unique.
      
      Differential revision: https://reviews.llvm.org/D63596
      
      llvm-svn: 364282
      60dc5d4b
    • Clement Courbet's avatar
      [ExpandMemCmp] Move all options to TargetTransformInfo. · 3bc5ad55
      Clement Courbet authored
      Split off from D60318.
      
      llvm-svn: 364281
      3bc5ad55
    • Haojian Wu's avatar
      [clangd] Cleanup the duplicated getTokenRange. · 92c32574
      Haojian Wu authored
      Summary:
      Also lift it to SourceCode.h, so that it can be used in other places
      (semantic code highlighting).
      
      Reviewers: kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63714
      
      llvm-svn: 364280
      92c32574
    • Gabor Marton's avatar
      [ASTImporter] Store import errors for Decls · 303c9861
      Gabor Marton authored
      Summary:
      We add a new member which is a mapping from the already-imported
      declarations in the "from" context to the error status of the import of
      that declaration.  This map contains only the declarations that were not
      correctly imported. The same declaration may or may not be included in
      ImportedDecls. This map is updated continuously during imports and never
      cleared (like ImportedDecls).  In Import(Decl*) we use this mapping, so
      if there was a previous failed import we return with the existing error.
      
      We add/remove from the Lookuptable in consistency with ImportedFromDecls.
      When we map a decl in the 'to' context to something in the 'from'
      context then and only then we add it to the lookup table. When we
      remove a mapping then and only then we remove it from the lookup table.
      
      This patch is the first in a series of patches whose aim is to further
      strengthen the error handling in ASTImporter.
      
      Reviewers: a_sidorin, a.sidorin, shafik
      
      Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D62373
      
      llvm-svn: 364279
      303c9861
    • Hiroshi Inoue's avatar
      [NFC] fix trivial typos in documents · 78edad1b
      Hiroshi Inoue authored
      llvm-svn: 364278
      78edad1b
    • Hans Wennborg's avatar
      Add llvm-symbolizer to LLVM_TOOLCHAIN_TOOLS (PR40152) · 79121e1d
      Hans Wennborg authored
      So that it gets installed in LLVM_INSTALL_TOOLCHAIN_ONLY builds.
      
      llvm-svn: 364277
      79121e1d
    • Pavel Labath's avatar
      Remove core loading timeout · 7ada1c53
      Pavel Labath authored
      Summary:
      If target.preload-symbols is false, waiting for the process to "stop"
      can take an arbitrarily long amount of time, because it will cause all
      the debug info to be parsed (to compute the stop message showing the
      function, its arguments, etc).
      
      We were previously waiting for 10 seconds for the stop even to arrive,
      which is a pretty long time, but it's not that hard to overcome with
      huge debug info.
      
      Since any arbitrary limit can be theoretically overcome with huge
      debug_info and/or slow machine, and the stop even was sent 3 lines above
      the wait, if we ever do not receive the stop even means we've got a bug
      in lldb. Therefore, I remove the timeout on this wait completely.
      
      No test because I don't know how to reproduce this without a
      multi-gigabyte symbol file.
      
      Reviewers: jingham, clayborg
      
      Subscribers: aprantl, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D63730
      
      llvm-svn: 364276
      7ada1c53
    • Hans Wennborg's avatar
      [LLVM-C] Add LLVM-C.dll to Windows installer package · 0d45eabc
      Hans Wennborg authored
      This is a follow up to D56781, D56774 and D35077 to makes the LLVM-C.dll
      file and LLVM-C.lib be installed on Windows, just like LTO.dll and
      LTO.lib are.
      
      Patch by Jakob Bornecrantz!
      
      Differential revision: https://reviews.llvm.org/D63717
      
      llvm-svn: 364275
      0d45eabc
    • Pavel Labath's avatar
      DWARF: Add support for type units+split dwarf combo · fcad3bc4
      Pavel Labath authored
      Summary:
      With the last round of refactors, supporting type units in dwo files
      becomes almost trivial. This patch contains a couple of small fixes,
      which taken as a whole make type units work in the split dwarf scenario
      (both DWARF4 and DWARF5):
      - DWARFContext: make sure we actually read the debug_types.dwo section
      - DWARFUnit: set string offsets base on all units in the dwo file, not
        just the main CU
      - ManualDWARFIndex: index all units in the file
      - SymbolFileDWARFDwo: Search for the single compile unit in the file, as
        we can no longer assume it will be the first one
      
      The last part makes it obvious that there is still some work to be done
      here, namely that we do not support dwo files with multiple compile
      units. That is something that should be easier after the DIERef
      refactors, but it still requires more work.
      
      Tests are added for the type units+split dwarf + dwarf4/5 scenarios, as
      well as a test that checks we behave reasonably in the presence of dwo
      files with multiple CUs.
      
      Reviewers: clayborg, JDevlieghere, aprantl
      
      Subscribers: arphaman, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D63643
      
      llvm-svn: 364274
      fcad3bc4
    • Rui Ueyama's avatar
      Fix an issue that common symbols are not internalized under some condition. · e63ae7fe
      Rui Ueyama authored
      r360841 introduced CommonSymbol class. An unintended behavioral change
      introduced by that change was that common symbols are not internalized
      by LTO under some condition. This patch fixes that issue.
      
      The issue occurred under the following condition:
      
        1. There exists a common symbol
        2. At least one DSO is given to lld or -pie is used
      
      If the above conditions are met, Symbol::includeInDynsym() returned a
      wrong value for a common symbol.
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=41978
      
      Differential Revision: https://reviews.llvm.org/D63752
      
      llvm-svn: 364273
      e63ae7fe