Skip to content
  1. May 24, 2014
  2. May 23, 2014
    • Akira Hatanaka's avatar
      Remove test while I investigate why the test is breaking the bots. · d59c92d0
      Akira Hatanaka authored
      llvm-svn: 209558
      d59c92d0
    • Richard Smith's avatar
      Recompute the injected class name type for a class template specialization · a1406fa5
      Richard Smith authored
      rather than saving and restoring it.
      
      llvm-svn: 209557
      a1406fa5
    • Akira Hatanaka's avatar
      XFAIL test which is breaking some of the build bots. · 3f1b632a
      Akira Hatanaka authored
      llvm-svn: 209556
      3f1b632a
    • Reid Kleckner's avatar
      Use comdats to avoid double initialization of weak data · 563f0e85
      Reid Kleckner authored
      Initializers of global data that can appear multiple TUs (static data
      members of class templates or __declspec(selectany) data) are now in a
      comdat group keyed on the global variable being initialized.  On
      non-Windows platforms, this is a code size and startup time
      optimization.  On Windows, this is necessary for ABI compatibility with
      MSVC.
      
      Fixes PR16959.
      
      Reviewers: rsmith
      
      Differential Revision: http://reviews.llvm.org/D3811
      
      llvm-svn: 209555
      563f0e85
    • David Blaikie's avatar
      DebugInfo: Generalize some tests to handle variations in attribute ordering. · 2f75351c
      David Blaikie authored
      In an effort to fix inlined debug info in situations where the out of
      line definition of a function preceeds any inlined usage, the order in
      which some attributes are added to subprogram DIEs may change. (in
      essence, definition-necessary attributes like DW_AT_low_pc/high_pc will
      be added immediately, but the names, types, and other features will be
      delayed to module end where they may either be added to the subprogram
      DIE or instead reference an abstract definition for those values)
      
      These tests can be generalized to be resilient to this change. 5 or so
      tests actually have to be incompatibly changed to cope with this
      reordering and will go along with the change that affects the order.
      
      llvm-svn: 209554
      2f75351c
    • David Blaikie's avatar
      DebugInfo: Generalize a test case to not depend on abbreviation numbering. · 71ed20f6
      David Blaikie authored
      It's an unnecessary detail for this test and just gets in the way when
      making unrelated changes to the output in this test.
      
      llvm-svn: 209553
      71ed20f6
    • Richard Smith's avatar
      [modules] If a referenced-but-not-instantiated class template specialization · 871cd4c1
      Richard Smith authored
      gets explicitly specialized, don't reuse the previous class template
      specialization declaration as a new declaration. The benefit here is fairly
      marginal, it harms source fidelity, and this is horrible to model if the
      specialization was imported from another module (without this change, it
      asserts or worse).
      
      llvm-svn: 209552
      871cd4c1
    • Andrew Trick's avatar
      Test case comments. Fix sloppiness. · b429083a
      Andrew Trick authored
      llvm-svn: 209551
      b429083a
    • Rafael Espindola's avatar
      clang-format function. · ef2c4fb2
      Rafael Espindola authored
      llvm-svn: 209550
      ef2c4fb2
    • Hans Wennborg's avatar
      Emit used/dllexport inline method definitions in nested classes (PR19743, PR11170) · a926d84c
      Hans Wennborg authored
      The previous code that was supposed to handle this didn't work
      since parsing of inline method definitions is delayed to the end
      of the outer class definition. Thus, when HandleTagDeclDefinition()
      got called for the inner class, the inline functions in that class
      had not been parsed yet.
      
      Richard suggested that the way to do this is by handling inline
      method definitions through a new ASTConsumer callback.
      
      I really wanted to call ASTContext::DeclMustBeEmitted() instead of
      checking for attributes, but doing that causes us to compute linkage,
      and then we fail with "error: unsupported: typedef changes linkage
      of anonymous type, but linkage was already computed" on tests like
      this: (from SemaCXX/undefined-internal.cpp) :-/
      
        namespace test7 {
          typedef struct {
            void bar();
            void foo() { bar(); }
          } A;
        }
      
      Differential Revision: http://reviews.llvm.org/D3809
      
      llvm-svn: 209549
      a926d84c
    • Rafael Espindola's avatar
      Remove a confusing use of a static method. · d2467599
      Rafael Espindola authored
      No functionality change.
      
      llvm-svn: 209548
      d2467599
    • David Blaikie's avatar
      DebugInfo: Put concrete definitions referencing abstract definitions in the... · 169ffe41
      David Blaikie authored
      DebugInfo: Put concrete definitions referencing abstract definitions in the same scope as the abstract definition.
      
      This seems like a simple cleanup/improved consistency, but also helps
      lay the foundation to fix the bug mentioned in the test case: concrete
      definitions preceeding any inlined usage aren't properly split into
      concrete + abstract (because they're not known to need it until it's too
      late).
      
      Once we start deferring this choice until later, we won't have the
      choice to put concrete definitions for inlined subroutines in a
      different scope from concrete definitions for non-inlined subroutines
      (since we won't know at time-of-construction which one it'll be). This
      change brings those two cases into alignment ahead of that future
      chaneg/fix.
      
      llvm-svn: 209547
      169ffe41
    • Hans Wennborg's avatar
      Don't suppress warning about dllimport on typedefs etc. in MicrosoftExt mode · be4be16b
      Hans Wennborg authored
      It's true the MSVC doesn't warn about dllimport when applied to e.g. a typedef,
      but that applies to dllexport too. I'd like us to be consistent, and I think
      the right thing to do is to warn.
      
      The original test that came with implementing the old behaviour doesn't provide
      a good motivation, and it said it was checking that we're not repoting an *error*,
      which is still true since this is just a warning.
      
      There are plenty of tests e.g. in Sema/dllimport.c to check that we do warn
      about dllimport on non functions or variables.
      
      Differential Revision: http://reviews.llvm.org/D3832
      
      llvm-svn: 209546
      be4be16b
    • Andrew Trick's avatar
      Fix and improve SCEV ComputeBackedgeTankCount. · 839e30b2
      Andrew Trick authored
      This is a follow-up to r209358: PR19799: Indvars miscompile due to an
      incorrect max backedge taken count from SCEV.
      
      That fix was incomplete as pointed out by Arnold and Michael Z. The
      code was also too confusing. It needed a careful rewrite with more
      unit tests. This version will also happen to optimize more cases.
      
      <rdar://17005101> PR19799: Indvars miscompile...
      
      llvm-svn: 209545
      839e30b2
    • Nico Rieck's avatar
      Revert part of "Fix broken FileCheck prefixes" · fe241369
      Nico Rieck authored
      This reverts part of commit r209538.
      
      llvm-svn: 209544
      fe241369
    • Rafael Espindola's avatar
      Use alias linkage and visibility to decide tls access mode. · a5bb2f61
      Rafael Espindola authored
      This matches both what we do for the non-thread case and what gcc does.
      
      With this patch clang would match gcc's behaviour in
      
      static __thread int a = 42;
      extern __thread int b __attribute__((alias("a")));
      int *f(void) { return &a; }
      int *g(void) { return &b; }
      
      if not for pr19843. Manually writing the IL does produce the same access modes.
      
      It is also a step in the direction of fixing pr19844.
      
      llvm-svn: 209543
      a5bb2f61
    • Nico Rieck's avatar
      Sema: Add more tests for dll attributes on inline functions · ffd8a336
      Nico Rieck authored
      llvm-svn: 209542
      ffd8a336
    • Nico Rieck's avatar
      Fix broken FileCheck prefix · 4da7debf
      Nico Rieck authored
      llvm-svn: 209541
      4da7debf
    • Nico Rieck's avatar
      Fix typo · f84814f9
      Nico Rieck authored
      llvm-svn: 209540
      f84814f9
    • Nico Rieck's avatar
      Remove unused CHECK lines · fb4c55fb
      Nico Rieck authored
      llvm-svn: 209539
      fb4c55fb
    • Nico Rieck's avatar
      Fix broken FileCheck prefixes · bd15945a
      Nico Rieck authored
      llvm-svn: 209538
      bd15945a
    • Jingyue Wu's avatar
      Add the extracted constant offset using GEP · bbb6e4a8
      Jingyue Wu authored
      Fixed a TODO in r207783.
      
      Add the extracted constant offset using GEP instead of ugly
      ptrtoint+add+inttoptr. Using GEP simplifies future optimizations and makes IR
      easier to understand. 
      
      Updated all affected tests, and added a new test in split-gep.ll to cover a
      corner case where emitting uglygep is necessary.
      
      llvm-svn: 209537
      bbb6e4a8
    • Lang Hames's avatar
      [RuntimeDyld] Remove relocation bounds check introduced in r208375 (MachO only). · 8e30e4b9
      Lang Hames authored
      We do all of our address arithmetic in 64-bit, and operations involving
      logically negative 32-bit offsets (actually represented as unsigned 64 bit ints)
      often overflow into higher bits. The overflow check could be preserved by
      casting to uint32 at the callsite for applyRelocationValue, but this would
      eliminate the value of the check.
      
      The right way to handle overflow in relocations is to make relocation processing
      target specific, and compute the values for RelocationEntry objects in the
      appropriate types (32-bit for 32-bit targets, 64-bit for 64-bit targets). This
      is coming as part of the cleanup I'm working on.
      
      This fixes another i386 regression test.
      
      <rdar://problem/16889891>
      
      llvm-svn: 209536
      8e30e4b9
Loading