1. Oct 09, 2015
    • Rui Ueyama's avatar
      ELF2: Split Writer::createSections into small functions. · 5a9640be
      Rui Ueyama authored
      Also added a few comments.
      
      llvm-svn: 249781
      5a9640be
    • Richard Smith's avatar
      55a7a248
    • Sanjoy Das's avatar
      [RS4GC] Refactoring to make a later change easier, NFCI · 3c520a12
      Sanjoy Das authored
      Summary:
      These non-semantic changes will help make a later change adding
      support for deopt operand bundles more streamlined.
      
      Reviewers: reames, swaroop.sridhar
      
      Subscribers: sanjoy, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13491
      
      llvm-svn: 249779
      3c520a12
    • Sanjoy Das's avatar
      [IRBuilder] Change the `gc.statepoint` creation interface · 4fd3d400
      Sanjoy Das authored
      This is to enable me to address review for D13491 -- `Flags` is a
      bitfield of `StatepointFlags`, not an individual item out of the enum,
      so it should be represented as an `uint32_t`.
      
      llvm-svn: 249778
      4fd3d400
    • Sanjoy Das's avatar
      [PlaceSafeopints] Extract out `callsGCLeafFunction`, NFC · c21a05a3
      Sanjoy Das authored
      Summary:
      This will be used in a later change to RewriteStatepointsForGC.
      
      Reviewers: reames, swaroop.sridhar
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13490
      
      llvm-svn: 249777
      c21a05a3
    • Sanjoy Das's avatar
      [RS4GC] Don't copy ADT's unneccessarily, NFCI · 1ede5367
      Sanjoy Das authored
      Summary: Use `const auto &` instead of `auto` in `makeStatepointExplicit`.
      
      Reviewers: reames, swaroop.sridhar
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13454
      
      llvm-svn: 249776
      1ede5367
    • Hans Wennborg's avatar
      Expose -f[no]ms-{compatibility,extensions} in clang-cl (PR25114) · 1f53eb6f
      Hans Wennborg authored
      These are enabled by default in clang-cl, because the whole idea is that
      it should work like cl.exe, but I suppose it can make sense to disable
      them if someone wants to compile code in a more strict mode.
      
      llvm-svn: 249775
      1f53eb6f
    • Sean Callanan's avatar
      Added support for enumerating the languages that actually support TypeSystems · fe38c850
      Sean Callanan authored
      and expressions.  Also wired that into the OptionValue infrastructure, although
      it isn't used for tab-completion yet.
      
      llvm-svn: 249769
      fe38c850
    • Kevin Enderby's avatar
      Fix a bug in llvm-objdump’s printing of Objective-C meta data · 46e642f8
      Kevin Enderby authored
      from malformed Mach-O files that caused a crash because of a
      section header had a size that extended past the end of the file.
      
      rdar://22983603
      
      llvm-svn: 249768
      46e642f8
    • Duncan P. N. Exon Smith's avatar
      Support: Stop relying on iterator auto-conversion, NFC · 6eeaff16
      Duncan P. N. Exon Smith authored
      Stop relying on ilist implicit conversions from `value_type&` to
      `iterator` in YAMLParser.cpp.
      
      I eventually want to outlaw this entirely.  It encourages
      `getNextNode()` and `getPrevNode()` in iterator logic, which is
      extremely fragile (and relies on them never returning `nullptr`).
      
      FTR, there's nothing nefarious going on in this case, it was just easy
      to clean up since the callers really wanted iterators to begin with.
      
      llvm-svn: 249767
      6eeaff16
    • Reid Kleckner's avatar
      Enable gtest SEH when building with clang-cl · 066c8db3
      Reid Kleckner authored
      Clang supports SEH well enough that this should work out of the box.  If
      it doesn't, we'll hear about it.
      
      llvm-svn: 249766
      066c8db3
    • Rui Ueyama's avatar
      00851fdf
    • Duncan P. N. Exon Smith's avatar
      AArch64: Stop using MachineInstr::getNextNode() · d389165c
      Duncan P. N. Exon Smith authored
      Stop using `getNextNode()` to get an insertion point (at least, in this
      one place).  Instead, use iterator logic directly.
      
      The `getNextNode()` interface isn't actually supposed to work for
      creating iterators; it's supposed to return `nullptr` (not a real
      iterator) if this is the last node.  It's currently broken and will
      "happen" to work, but if we ever fix the function, we'll get some
      strange failures in places like this.
      
      llvm-svn: 249764
      d389165c
    • Duncan P. N. Exon Smith's avatar
      MC: Stop using Fragment::getNextNode() · ece61624
      Duncan P. N. Exon Smith authored
      Stop using `getNextNode()` to get an iterator to a fragment (at least,
      in this one place).  Instead, use iterator logic directly.
      
      The `getNextNode()` interface isn't actually supposed to work for
      creating iterators; it's supposed to return `nullptr` (not a real
      iterator) if this is the last node.  It's currently broken and will
      "happen" to work, but if we ever fix the function, we'll get some
      strange failures in places like this.
      
      llvm-svn: 249763
      ece61624
    • Frederic Riss's avatar
      [dsymutil] Try to find lipo first besides dsymutil before looking up the PATH. · 02cccde9
      Frederic Riss authored
      Even if we don't have it in PATH, lipo should usually exist in the same directory
      as dsymutil. Keep the fallback looking up the PATH, it's very useful when
      testing a non-installed executable.
      
      llvm-svn: 249762
      02cccde9
    • Richard Smith's avatar
      Split <stddef.h> out of <cstddef>. · d6cffc4f
      Richard Smith authored
      There are a bunch of macros (__need_size_t etc) that request just one piece of
      <stddef.h>; if any one of these is defined, we just directly include the
      underlying header.
      
      Note that <stddef.h> provides a ::nullptr_t. We don't want that available to
      includers of <cstddef>, so instead of following the usual pattern where <cfoo>
      includes <foo.h> then pulls things from :: into std:: with using-declarations,
      we implement <stddef.h> and <cstddef> separately; both include <__nullptr> for
      the definition of std::nullptr_t.
      
      llvm-svn: 249761
      d6cffc4f
    • Hal Finkel's avatar
      [ELF2] Make the system page size a target-dependent property · e3c2626a
      Hal Finkel authored
      The required page alignment is different on different targets. On PowerPC, for
      example, we need 64K pages (the loader won't set different permissions on a
      finer granularity than that). I've set the existing targets to what I believe
      to be the correct values, and have updated the regression tests accordingly.
      
      llvm-svn: 249760
      e3c2626a
    • Evgeniy Stepanov's avatar
      Fix msan tests build. · 6870dc73
      Evgeniy Stepanov authored
      CMake build rules listed -I flags for two different libc++ header
      locations which broke when libc++ headers started using include_next.
      
      Also change -I to -isystem to avoid compiler warning about
      include_next.
      
      llvm-svn: 249759
      6870dc73
    • Duncan P. N. Exon Smith's avatar
      PowerPC: Don't use getNextNode() for insertion point · a3da4488
      Duncan P. N. Exon Smith authored
      Stop using `getNextNode()` to create an insertion point for machine
      instructions (at least, in this one place).  Instead, use an iterator.
      As a drive-by, clean up dump statements to use iterator logic.
      
      The `getNextNode()` interface isn't actually supposed to work for
      insertion points; it's supposed to return `nullptr` if this is the last
      node.  It's currently broken and will "happen" to work, but if we ever
      fix the function, we'll get some strange failures.
      
      llvm-svn: 249758
      a3da4488
    • Hal Finkel's avatar
      [ELF2] Make the .plt entry size target dependent · 6c2a3b83
      Hal Finkel authored
      The size of a .plt entry is different on different targets (it is,
      specifically, much larger than 8 on all PPC ABIs). There is no functional
      change here (later patches to create .plt entries for PPC64 will depend on this
      change).
      
      llvm-svn: 249756
      6c2a3b83
    • Jason Molenda's avatar
      Re-commit the (fixed) changes from r248985 which were reverted by Pavel · 8825c5c9
      Jason Molenda authored
      when they introduced android testsuite regressions.  Pavel has run the
      testsuite against the updated patch and it completes cleanly now.
      
      The original commit message:
      
      
      Fixing a subtle issue on Mac OS X systems with dSYMs (possibly
      introduced by r235737 but I didn't look into it too closely).
      
      A dSYM can have a per-UUID plist in it which tells lldb where
      to find an executable binary for the dSYM (DBGSymbolRichExecutable)
      - other information can be included in this plist, like how to
      remap the source file paths from their build pathnames to their
      long-term storage pathnames.
      
      This per-UUID plist is a unusual; it is used probably exclusively
      inside apple with our build system.  It is not created by default
      in normal dSYMs.
      
      The problem was like this:
      
        1. lldb wants to find an executable, given only a UUID
           (this happens when lldb is doing cross-host debugging
            and doesn't have a copy of the target system's binaries)
      
        2. It eventually calls LocateMacOSXFilesUsingDebugSymbols
           which does a spotlight search for the dSYM on the local
           system, and failing that, tries the DBGShellCommands
           command to find the dSYM.
      
        3. It gets a dSYM.  It reads the per-UUID plist in the dSYM.
           The dSYM has a DBGSymbolRichExecutable kv pair pointing to
           the binary on a network filesystem.
      
        4. Using the binary on the network filesystem, lldb now goes
           to find the dSYM.
      
        5. It starts by looking for a dSYM next to the binary it found.
      
        6. lldb is now reading the dSYM over a network filesystem,
           ignoring the one it found on its local filesystem earlier.
      
      Everything still *works* but it's much slower.
      
      This would be a tricky one to write up in a testsuite case;
      you really need the binary to not exist on the local system.
      And LocateMacOSXFilesUsingDebugSymbols will only compile on
      Mac OS X - even if I found a way to write up a test case, it
      would not run anywhere but on a mac.
      
      One change Greg wanted while I was touching this code was to
      have LocateMacOSXFilesUsingDebugSymbols (which could be asked
      to find a binary OR find a dSYM) to instead return a ModuleSpec
      with the sum total of everything it could find.  This
      change of passing around a ModuleSpec instead of a FileSpec
      was percolated up into ModuleList::GetSharedModule.
      
      The changes to LocateMacOSXFilesUsingDebugSymbols look larger
      than they really are - there's a lot of simple whitespace changes
      in there.
      
      I ran the testsuites on mac, no new regressions introduced
      
      <rdar://problem/21993813> 
      
      llvm-svn: 249755
      8825c5c9
    • Evgeniy Stepanov's avatar
      New MSan mapping layout (compiler-rt part). · b688a479
      Evgeniy Stepanov authored
      This is an implementation of
      https://github.com/google/sanitizers/issues/579
      
      It has a number of advantages over the current mapping:
      * Works for non-PIE executables.
      * Does not require ASLR; as a consequence, debugging MSan programs in
        gdb no longer requires "set disable-randomization off".
      * Supports linux kernels >=4.1.2.
      * The code is marginally faster and smaller.
      
      This is an ABI break. We never really promised ABI stability, but
      this patch includes a courtesy escape hatch: a compile-time macro
      that reverts back to the old mapping layout.
      
      llvm-svn: 249754
      b688a479
    • Evgeniy Stepanov's avatar
      New MSan mapping layout (llvm part). · d12212bc
      Evgeniy Stepanov authored
      This is an implementation of
      https://github.com/google/sanitizers/issues/579
      
      It has a number of advantages over the current mapping:
      * Works for non-PIE executables.
      * Does not require ASLR; as a consequence, debugging MSan programs in
        gdb no longer requires "set disable-randomization off".
      * Supports linux kernels >=4.1.2.
      * The code is marginally faster and smaller.
      
      This is an ABI break. We never really promised ABI stability, but
      this patch includes a courtesy escape hatch: a compile-time macro
      that reverts back to the old mapping layout.
      
      llvm-svn: 249753
      d12212bc
    • Hal Finkel's avatar
      Revert: r249728 - Roll back r249726 and r249723 because they broke buildbots. · 4729064a
      Hal Finkel authored
      Reapply r249726 (and r249723), hopefully with the correct test fixups this time.
      
      Original commit message:
      
      Address a FIXME in ELF/Writer.cpp: Make VAStart a target-dependent property.
      I've set the values for the existing targets to what I believe to be the
      correct values, and updated the regression tests accordingly.
      
      llvm-svn: 249752
      4729064a
    • Evgeniy Stepanov's avatar
      Use Triple.isAndroid() where possible. · 14deb7b6
      Evgeniy Stepanov authored
      llvm-svn: 249751
      14deb7b6
    • Evgeniy Stepanov's avatar
      Add Triple::isAndroid(). · 5fe279e7
      Evgeniy Stepanov authored
      This is a simple refactoring that replaces Triple.getEnvironment()
      checks for Android with Triple.isAndroid().
      
      llvm-svn: 249750
      5fe279e7
    • Richard Smith's avatar
      Fix incorrect file header. This is <cfenv> not <cctype>. · 239ab3c0
      Richard Smith authored
      llvm-svn: 249749
      239ab3c0
    • Reid Kleckner's avatar
      [WinEH] Push cleanupendpad scopes around exceptional cleanups · 55391524
      Reid Kleckner authored
      We were only doing this for SEH as a special case. Generalize it to all
      cleanups.
      
      llvm-svn: 249748
      55391524
    • Greg Clayton's avatar
      Moved the target specific ClangASTContext initialization over into ClangASTContext::CreateInstance. · 5beec213
      Greg Clayton authored
      This involved changing the TypeSystem::CreateInstance to take a module or a target. This allows type systems to create an AST for modules (no expression support needed) or targets (expression support is needed) and return the correct class instance for both cases.
      
      llvm-svn: 249747
      5beec213
    • Rui Ueyama's avatar
      Re-apply r249630: ELF2: Use `-flavor gnu2` after `not` to fix Windows buildbot. · 1890799f
      Rui Ueyama authored
      Thanks to George Rimar's r249696, `not` is now able to find ld.lld2
      executable correctly.
      
      llvm-svn: 249746
      1890799f
    • Teresa Johnson's avatar
      Fix another UBSan test error from r248897 and follow on fix r249689 · 881e8860
      Teresa Johnson authored
      While here fix a few more issues with potential overflow and add
      new tests for these cases. Ensured that test now passes with UBSan.
      
      llvm-svn: 249745
      881e8860
    • Rafael Espindola's avatar
      Don't silently ignore an error. · 6390d16f
      Rafael Espindola authored
      Found by inspection.
      
      llvm-svn: 249744
      6390d16f
    • Richard Smith's avatar
      Split <setjmp.h> out of <csetjmp>. · 38a2a28f
      Richard Smith authored
      llvm-svn: 249743
      38a2a28f
    • Richard Smith's avatar
      Split <math.h> out of <cmath>. · 524956bb
      Richard Smith authored
      llvm-svn: 249742
      524956bb
    • Richard Smith's avatar
      Split <inttypes.h> out of <cinttypes>. · 37df7a05
      Richard Smith authored
      llvm-svn: 249741
      37df7a05
    • Richard Smith's avatar
      Split <float.h> out of <cfloat>. · 33700e64
      Richard Smith authored
      llvm-svn: 249740
      33700e64
    • Richard Smith's avatar
      Split <errno.h> out of <cerrno>. · 3cb38811
      Richard Smith authored
      llvm-svn: 249739
      3cb38811
    • Richard Smith's avatar
      Split <ctype.h> out of <cctype>. · f80c1b73
      Richard Smith authored
      llvm-svn: 249738
      f80c1b73
    • Richard Smith's avatar
      Factor definition of std::nullptr_t out of <cstddef> into a header that can... · c467d9b4
      Richard Smith authored
      Factor definition of std::nullptr_t out of <cstddef> into a header that can also be used by <stddef.h>.
      
      llvm-svn: 249737
      c467d9b4
    • Rafael Espindola's avatar
      Make this test a bit stricter. · 98af66f9
      Rafael Espindola authored
      The only way for SecIndex to be zero in here is for an extended section
      number to be zero, which would be an error.
      
      llvm-svn: 249736
      98af66f9