Permalink
Switch branches/tags
Nothing to show
Commits on Apr 12, 2015
  1. Simplified datalayout string since Clang does not like it fully speci…

    JP Bonn JP Bonn
    JP Bonn authored and JP Bonn committed Apr 12, 2015
    …fied.
Commits on Jan 14, 2015
  1. Merge branch 'master' of http://llvm.org/git/clang

    JP Bonn
    JP Bonn committed Jan 14, 2015
  2. clang-format: Disable flag for Google's Java and Javascript styles.

    djasper committed Jan 14, 2015
    Disable AlwaysBreakBeforeMultilineString, as the style guides don't
    really say to do so.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225982 91177308-0d34-0410-b5e6-96231b3b80d8
  3. Merge branch 'master' of http://llvm.org/git/clang

    JP Bonn
    JP Bonn committed Jan 14, 2015
  4. [mips] Handle transparent unions correctly.

    Daniel Sanders
    Daniel Sanders committed Jan 14, 2015
    Summary:
    This fixes MultiSource/Applications/lemon on big-endian N32 by correcting the
    handling of the argument to wait(). glibc defines it as a transparent union of
    void* and int*. Such unions are passed according to the rules of the first
    member so the argument must be passed as if it were a void* (sign extended from
    i32 to i64) and not as a union (shifted to the upper bits of an i64).
    
    wait() already behaves correctly on big-endian O32 and N64 since the union is
    already the same size as an argument slot.
    
    Reviewers: atanasyan
    
    Reviewed By: atanasyan
    
    Subscribers: cfe-commits
    
    Differential Revision: http://reviews.llvm.org/D6963
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225981 91177308-0d34-0410-b5e6-96231b3b80d8
  5. [cleanup] Re-sort *all* #include lines with llvm/utils/sort_includes.py

    chandlerc committed Jan 14, 2015
    Sorry for the noise, I managed to miss a bunch of recent regressions of
    include orderings here. This should actually sort all the includes for
    Clang. Again, no functionality changed, this is just a mechanical
    cleanup that I try to run periodically to keep the #include lines as
    regular as possible across the project.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225979 91177308-0d34-0410-b5e6-96231b3b80d8
  6. [cleanup] Re-sort the #include lines using llvm/utils/sort_includes.py

    chandlerc committed Jan 14, 2015
    No functionality changed, this is a purely mechanical cleanup to ensure
    the #include order remains consistent across the project.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225975 91177308-0d34-0410-b5e6-96231b3b80d8
  7. clang-format: [Java] Support try blocks with resources.

    djasper committed Jan 14, 2015
    Before:
      try
        (SomeResource rs = someFunction()) {
          Something();
        }
    
    After:
      try (SomeResource rs = someFunction()) {
        Something();
      }
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225973 91177308-0d34-0410-b5e6-96231b3b80d8
  8. clang-format: [Java] Prefer not to break in parameter annotations.

    djasper committed Jan 14, 2015
    Before:
      boolean someFunction(@Param(aaaaaaaaaaaaaaaa)
                           String aaaaa,
          String bbbbbbbbbbbbbbb) {}
    
    After:
      boolean someFunction(
          @Param(aaaaaaaaaaaaaaaa) String aaaaa,
          String bbbbbbbbbbbbbbb) {}
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225971 91177308-0d34-0410-b5e6-96231b3b80d8
  9. clang-format: [Java] Understand "import static".

    djasper committed Jan 14, 2015
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225965 91177308-0d34-0410-b5e6-96231b3b80d8
  10. clang-format: [Java] Don't let annotations confuse return type analysis.

    djasper committed Jan 14, 2015
    Before:
      @Test
      ReturnType
      doSomething(String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {}
    
    After:
      @Test
      ReturnType doSomething(
          String aaaaaaaaaaaaa, String bbbbbbbbbbbbbbb) {}
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225964 91177308-0d34-0410-b5e6-96231b3b80d8
  11. clang-format: [Java] Don't line-wrap before annotations' l_parens.

    djasper committed Jan 14, 2015
    Before:
      @SomeAnnotation
      (aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa)
      int i;
    
    After:
      @SomeAnnotation(
          aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa)
      int i;
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225963 91177308-0d34-0410-b5e6-96231b3b80d8
  12. clang-format: [Java] Don't get confused by leading annotations.

    djasper committed Jan 14, 2015
    Before:
      @Test(a)
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaaaa(
          aaaaaaaaaaaaaaaaaaaaaaa);
    
    After:
      @Test(a)
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
          aaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaa);
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225962 91177308-0d34-0410-b5e6-96231b3b80d8
  13. The assembler is now enabled by default.

    brad0 committed Jan 14, 2015
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225961 91177308-0d34-0410-b5e6-96231b3b80d8
  14. Reapply r225000 (reverted in r225555): DebugInfo: Generalize debug in…

    dwblaikie committed Jan 14, 2015
    …fo location handling (and follow-up commits).
    
    Several pieces of code were relying on implicit debug location setting
    which usually lead to incorrect line information anyway. So I've fixed
    those (in r225955 and r225845) separately which should pave the way for
    this commit to be cleanly reapplied.
    
    The reason these implicit dependencies resulted in crashes with this
    patch is that the debug location would no longer implicitly leak from
    one place to another, but be set back to invalid. Once a call with
    no/invalid location was emitted, if that call was ever inlined it could
    produce invalid debugloc chains and assert during LLVM's codegen.
    
    There may be further cases of such bugs in this patch - they're hard to
    flush out with regression testing, so I'll keep an eye out for reports
    and investigate/fix them ASAP if they come up.
    
    Original commit message:
    
    Reapply "DebugInfo: Generalize debug info location handling"
    
    Originally committed in r224385 and reverted in r224441 due to concerns
    this change might've introduced a crash. Turns out this change fixes the
    crash introduced by one of my earlier more specific location handling
    changes (those specific fixes are reverted by this patch, in favor of
    the more general solution).
    
    Recommitted in r224941 and reverted in r224970 after it caused a crash
    when building compiler-rt. Looks to be due to this change zeroing out
    the debug location when emitting default arguments (which were meant to
    inherit their outer expression's location) thus creating call
    instructions without locations - these create problems for inlining and
    must not be created. That is fixed and tested in this version of the
    change.
    
    Original commit message:
    
    This is a more scalable (fixed in mostly one place, rather than many
    places that will need constant improvement/maintenance) solution to
    several commits I've made recently to increase source fidelity for
    subexpressions.
    
    This resetting had to be done at the DebugLoc level (not the
    SourceLocation level) to preserve scoping information (if the resetting
    was done with CGDebugInfo::EmitLocation, it would've caused the tail end
    of an expression's codegen to end up in a potentially different scope
    than the start, even though it was at the same source location). The
    drawback to this is that it might leave CGDebugInfo out of sync. Ideally
    CGDebugInfo shouldn't have a duplicate sense of the current
    SourceLocation, but for now it seems it does... - I don't think I'm
    going to tackle removing that just now.
    
    I expect this'll probably cause some more buildbot fallout & I'll
    investigate that as it comes up.
    
    Also these sort of improvements might be starting to show a weakness/bug
    in LLVM's line table handling: we don't correctly emit is_stmt for
    statements, we just put it on every line table entry. This means one
    statement split over multiple lines appears as multiple 'statements' and
    two statements on one line (without column info) are treated as one
    statement.
    
    I don't think we have any IR representation of statements that would
    help us distinguish these cases and identify the beginning of each
    statement - so that might be something we need to add (possibly to the
    lexical scope chain - a scope for each statement). This does cause some
    problems for GDB and possibly other DWARF consumers.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225956 91177308-0d34-0410-b5e6-96231b3b80d8
  15. DebugInof: Correct the location of exception cleanups in global ctors…

    dwblaikie committed Jan 14, 2015
    …/dtors and ObjC methods
    
    Without setting the CurEHLocation these cleanups would be attributed to
    whatever the last active debug line location was (the 'fn' call in the
    included test cases). By setting CurEHLocation correctly the line
    information is improved/corrected.
    
    This quality bug turned into a crasher with r225000 when, instead of
    allowing the last location to persist, it would be zero'd out. This
    could lead to a function call (such as the dtor) being made without a
    debug location - if that call was subsequently inlined (and the caller
    and callee had debug info, just not the call instruction) the inliner
    would violate important constraints about the debug location chains by
    not updating the inlined instructions to chain up to the callee
    locations.
    
    So, by fixing this bug, I am addressing the assertion failures
    introduced by r225000 and should be able to recommit that patch with
    impunity...
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225955 91177308-0d34-0410-b5e6-96231b3b80d8
  16. Revert "Insert random noops to increase security against ROP attacks …

    jfbastien committed Jan 14, 2015
    …(clang)"
    
    This reverts commit:
    http://reviews.llvm.org/D3393
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225947 91177308-0d34-0410-b5e6-96231b3b80d8
  17. Sema: Relax parsing of '#' in constraints

    majnemer committed Jan 14, 2015
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225942 91177308-0d34-0410-b5e6-96231b3b80d8
  18. Sema: Check type compatibility with the most recent decl when merging

    majnemer committed Jan 14, 2015
    We would check the type information from the declaration found by lookup
    but we would neglect checking compatibility with the most recent
    declaration.  This would make it possible for us to not correctly
    diagnose inconsistencies with declarations which were made in a
    different scope.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225934 91177308-0d34-0410-b5e6-96231b3b80d8
  19. [AVX512] Add FP unpack intrinsics

    anemet committed Jan 14, 2015
    These are implemented with __builtin_shufflevector just like AVX.
    
    We have some tests on the LLVM side to assert that these shufflevectors do
    indeed generate the corresponding unpck instruction.
    
    Part of <rdar://problem/17688758>
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225922 91177308-0d34-0410-b5e6-96231b3b80d8
  20. Insert random noops to increase security against ROP attacks (clang)

    jfbastien committed Jan 14, 2015
    A pass that adds random noops to X86 binaries to introduce diversity with the goal of increasing security against most return-oriented programming attacks.
    
    Command line options:
      -noop-insertion // Enable noop insertion.
      -noop-insertion-percentage=X // X% of assembly instructions will have a noop prepended (default: 50%, requires -noop-insertion)
      -max-noops-per-instruction=X // Randomly generate X noops per instruction. ie. roll the dice X times with probability set above (default: 1). This doesn't guarantee X noop instructions.
    
    In addition, the following 'quick switch' in clang enables basic diversity using default settings (currently: noop insertion and schedule randomization; it is intended to be extended in the future).
      -fdiversify
    
    This is the clang part of the patch.
    llvm part: D3392
    
    http://reviews.llvm.org/D3393
    Patch by Stephen Crane (@rinon)
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225910 91177308-0d34-0410-b5e6-96231b3b80d8
  21. Update HelpText for -fsanitize= option.

    vonosmas committed Jan 14, 2015
    There are too many available sanitizers now - redirect to
    user manual instead of listing them all.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225894 91177308-0d34-0410-b5e6-96231b3b80d8
  22. Update for move in llvm.

    echristo committed Jan 14, 2015
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225892 91177308-0d34-0410-b5e6-96231b3b80d8
  23. Look through sugar when determining whether a type is a scoped enumer…

    zygoloid committed Jan 14, 2015
    …ation
    
    type. Patch by Stephan Bergmann!
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225889 91177308-0d34-0410-b5e6-96231b3b80d8
  24. Sema: An extern declaration can't be a redeclaration of a parameter

    majnemer committed Jan 14, 2015
    In the following:
    void f(int x) { extern int x; }
    
    The second declaration of 'x' shouldn't be considered a redeclaration of
    the parameter.
    
    This is a different approach to r225780.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225875 91177308-0d34-0410-b5e6-96231b3b80d8
  25. Sink a parameter into the callee since it's always the same expressio…

    dwblaikie committed Jan 14, 2015
    …n in terms of another parameter
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225856 91177308-0d34-0410-b5e6-96231b3b80d8
Commits on Jan 13, 2015
  1. DebugInfo: Correct the location of EH cleanup for blocks

    dwblaikie committed Jan 13, 2015
    This was previously piggybacking on whatever happened to be the last
    location set on CGDebugInfo/DIBuilder, which was wrong (it was often the
    current location, such as the 'fn()' call site, not the end of the
    block). With my improvements to set/unset the location in a scoped
    manner (r225000) this went from a bad quality situation, to a crash.
    Fixing this goes part-way to unblocking the recommit of r225000.
    
    It's likely that any call to CodeGenFunction::StartFunction without the
    CurEHLocation set represents a similar bug or risk of a bug. Perhaps
    there are some callers that know they won't generate EH cleanups, but
    I'm not sure.
    
    I considered a generic catch-fix in StartFunction (just fallback to the
    GlobalDecl's location) but that seemed like it'd mask bugs where the EH
    location shouldn't be the same as the decl's location (& indeed by not
    using that stop-gap I found this bug). We'll see how long I can hold out
    on the generic catch-all. I might eventually be able to add an assertion
    in.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225845 91177308-0d34-0410-b5e6-96231b3b80d8
  2. clang-format: [Java] Detect `native` keyword.

    nico committed Jan 13, 2015
    Before:
      public native<X> Foo foo();
    
    After:
      public native <X> Foo foo();
    
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225839 91177308-0d34-0410-b5e6-96231b3b80d8
  3. Add [extern_c] attribute to _Builtin_intrinsics module

    benlangmuir committed Jan 13, 2015
    This allows users to import this module inside an extern "C" {} block.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225835 91177308-0d34-0410-b5e6-96231b3b80d8
  4. Mention FreeBSD support.

    rdivacky committed Jan 13, 2015
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225834 91177308-0d34-0410-b5e6-96231b3b80d8
  5. Updated to match latest LLVM changes.

    JP Bonn
    JP Bonn committed Jan 13, 2015
  6. When attribute 'optnone' appears on the same declaration with a

    Paul Robinson
    Paul Robinson committed Jan 13, 2015
    conflicting attribute, warn about the conflict and pick a "winning"
    attribute to preserve, instead of emitting an error.  This matches the
    behavior when the conflicting attributes are on different declarations.
    
    Along the way I discovered that conflicts involving __forceinline were
    reported as 'always_inline' (alternate spelling, same attribute) so
    fixed that up to report the attribute as spelled in the source.
    
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225813 91177308-0d34-0410-b5e6-96231b3b80d8
  7. Inherit attributes when infering a framework module

    benlangmuir committed Jan 13, 2015
    If a module map contains
    framework module * [extern_c] {}
    
    We will now infer [extern_c] on the inferred framework modules (we
    already inferred [system] as a special case).
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225803 91177308-0d34-0410-b5e6-96231b3b80d8