1. Jun 20, 2020
    • Raphael Isemann's avatar
      [lldb] Disable complex tests on Windows · 6331c7d0
      Raphael Isemann authored
      The tests fail to compile there:
      ```
      complex/main.c:4:16: error: expected ';' at end of declaration
        float complex complex_float = -1.5f + -2.5f * I;
                     ^
                     ;
      ```
      6331c7d0
    • Sanjay Patel's avatar
      [VectorCombine] fix crash while transforming constants · 6d864097
      Sanjay Patel authored
      This is a variation of the proposal in D82049 with an extra test.
      6d864097
    • Fangrui Song's avatar
      [ELF] Refine LMA offset propagation rule in D76995 · 8ffb2097
      Fangrui Song authored
      If neither AT(lma) nor AT>lma_region is specified,
      D76995 keeps `lmaOffset` (LMA - VMA) if the previous section is in the
      default LMA region.
      
      This patch additionally checks that the two sections are in the same
      memory region.
      
      Add a test case derived from https://bugs.llvm.org/show_bug.cgi?id=45313
      
        .mdata : AT(0xfb01000) { *(.data); } > TCM
        // It is odd to make .bss inherit lmaOffset, because the two sections
        // are in different memory regions.
        .bss : { *(.bss) } > DDR
      
      With this patch, section VMA/LMA match GNU ld. Note, GNU ld supports
      out-of-order (w.r.t sh_offset) sections and places .text and .bss in the
      same PT_LOAD. We don't have that behavior.
      
      Reviewed By: grimar
      
      Differential Revision: https://reviews.llvm.org/D81986
      8ffb2097
    • peter klausler's avatar
      [flang] DATA stmt processing (part 3/4): Remaining prep work · 4171f80d
      peter klausler authored
      Rolls up small changes across the frontend to prepare for the large
      forthcoming patch (part 4/4) that completes DATA statement processing
      via conversion to initializers.
      
      Reviewed By: PeteSteinfeld
      
      Differential Revision: https://reviews.llvm.org/D82137
      4171f80d
    • Fangrui Song's avatar
      [ELF] Refactor ObjFile<ELFT>::initializeSymbols to enforce the invariant:... · c4d13f72
      Fangrui Song authored
      [ELF] Refactor ObjFile<ELFT>::initializeSymbols to enforce the invariant: InputFile::symbols has non null entry
      
      Fixes PR46348.
      
      ObjFile<ELFT>::initializeSymbols contains two symbol iteration loops:
      
      ```
      for each symbol
        if non-inheriting && non-local
          fill in this->symbols[i]
      
      for each symbol
        if local
          fill in this->symbols[i]
        else
          symbol resolution
      ```
      
      Symbol resolution can trigger a duplicate symbol error which will call
      InputSectionBase::getObjMsg to iterate over InputFile::symbols.  If a
      non-local symbol appears after the non-local symbol being resolved
      (violating ELF spec), its `this->symbols[i]` entry has not been filled
      in, InputSectionBase::getObjMsg will crash due to
      `dyn_cast<Defined>(nullptr)`.
      
      To fix the bug, reorganize the two loops to ensure this->symbols is
      complete before symbol resolution. This enforces the invariant:
      InputFile::symbols has none null entry when InputFile::getSymbols() is called.
      
      ```
      for each symbol
        if non-inheriting
          fill in this->symbols[i]
      
      for each symbol starting from firstGlobal
        if non-local
          symbol resolution
      ```
      
      Additionally, move the (non-local symbol in local part of .symtab)
      diagnostic from Writer<ELFT>::copyLocalSymbols() to initializeSymbols().
      
      Reviewed By: grimar, jhenderson
      
      Differential Revision: https://reviews.llvm.org/D81988
      c4d13f72
    • Stanislav Mekhanoshin's avatar
      2b87a44c
  2. Jun 19, 2020