Skip to content
  1. Mar 04, 2014
    • Richard Smith's avatar
      Fix typo that resulted in names at TU scope getting lost sometimes after a · 309271b0
      Richard Smith authored
      module import.
      
      llvm-svn: 202771
      309271b0
    • David Blaikie's avatar
      DebugInfo: Emit only the declaration of a class template that has an explicit... · 0e716b42
      David Blaikie authored
      DebugInfo: Emit only the declaration of a class template that has an explicit instantiation declaration (& always emit such a type when there's an explicit instantiation definition)
      
      We should only have this optimization fire when the explicit
      instantiation definition would cause at  least one member function to be
      emitted, thus ensuring that even a compiler not performing this
      optimization would still emit the full type information elsewhere.
      
      But we should also pessimize output still by always emitting the
      definition when the explicit instantiation definition appears so that at
      some point in the future we can depend on that information even when no
      code had to be emitted in that TU. (this shouldn't happen very often,
      since people mostly use explicit spec decl/defs to reduce code size -
      but perhaps one day they could use it to explicitly reduce debug info
      size too)
      
      This was worth about 2% for Clang and LLVM - so not a huge win, but a
      win. It looks really great for simple STL programs (include <string> and
      just declare a string - 14k -> 1.4k of .dwo)
      
      llvm-svn: 202769
      0e716b42
  2. Mar 03, 2014
  3. Mar 02, 2014
    • David Majnemer's avatar
      Normalize line endings · b1004103
      David Majnemer authored
      Some files had CRLF line terminators, some only had a mixture of
      CRLF and LF.  Switch to LF.
      
      llvm-svn: 202659
      b1004103
    • Hal Finkel's avatar
      Add a PPC inline asm constraint type for single CR bits · f7a07a50
      Hal Finkel authored
      This adds support for the PPC "wc" inline asm constraint (used for allocating
      individual CR bits). Support for this constraint type was recently added to the
      LLVM PowerPC backend. Although gcc does not currently support allocating
      individual CR bits, this identifier choice has been coordinated with the gcc
      PowerPC team, and will be marked as reserved for this purpose in the gcc
      constraints.md file.
      
      Prior to this change, none of the multi-character PPC constraints were handled
      correctly (the '^' escape character was not being added as required by the
      parsing code in LLVM). This should now be fixed. I'll add tests for these other
      constraints as support is added for them in the backend.
      
      llvm-svn: 202658
      f7a07a50
    • Richard Smith's avatar
      Add [extern_c] attribute for modules, allowing a C module to be imported... · 77944868
      Richard Smith authored
      Add [extern_c] attribute for modules, allowing a C module to be imported within an extern "C" block in C++ code.
      
      llvm-svn: 202615
      77944868
  4. Mar 01, 2014
    • Warren Hunt's avatar
      Fixed an assertion failure related to bitfield lowering. · fed55979
      Warren Hunt authored
      When lowering a bitfield, CGRecordLowering would assign the wrong 
      storage type to a bitfield in some cases and trigger an assertion.  In 
      these cases the layout was still correct, just the bitfield info was 
      wrong.
      
      llvm-svn: 202562
      fed55979
    • Richard Smith's avatar
      If a module A exports a macro M, and a module B imports that macro and #undef's · 49f906a3
      Richard Smith authored
      it, importers of B should not see the macro. This is complicated by the fact
      that A's macro could also be visible through a different path. The rules (as
      hashed out on cfe-commits) are included as a documentation update in this
      change.
      
      With this, the number of regressions in libc++'s testsuite when modules are
      enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are
      due to remaining bugs in this change (in particular, the handling of submodules
      is imperfect).
      
      llvm-svn: 202560
      49f906a3
  5. Feb 28, 2014
  6. Feb 27, 2014
    • Ted Kremenek's avatar
      [-Wunreachable-code] always treat 'case:' and 'default:' cases as reachable. · 08da9781
      Ted Kremenek authored
      This is a heuristic.  Many switch statements, although they look covered
      over an enum, may actually handle at runtime more values than in the enum.
      
      This is overly conservative, as there are some cases that clearly
      can be ruled as being clearly unreachable, e.g. 'switch (42) { case 1: ... }'.
      We can refine this later.
      
      llvm-svn: 202436
      08da9781
    • Ted Kremenek's avatar
    • John McCall's avatar
      Diagnose attempts to apply ms_struct to records with base classes · 95833f33
      John McCall authored
      or virtual functions, but permit that error to be downgraded to
      a warning (with -Wno-error=incompatible-ms-struct), and officially
      support this kind of dual, ABI-mixing layout.
      
      The basic problem here is that projects which use ms_struct are often
      not very circumspect about what types they annotate; for example,
      some projects enable the pragma in a prefix header and then only
      selectively disable it around system header inclusions.  They may
      only care about binary compatibility with MSVC for a subset of
      those structs, but that doesn't mean they have no binary
      compatibility concerns at all for the rest; thus we are essentially
      forced into supporting this hybrid ABI.  But it's reasonable for
      us to at least point out the places where we're not making
      any guarantees.
      
      The original diagnostic was for dynamic classes, i.e. those with
      virtual functions or virtual bases; I've extended it to include
      all classes with bases, because we are not actually making any
      attempt to duplicate MSVC's base subobject layout in ms_struct
      (and it is indeed quite different from Itanium, even for
      non-virtual bases).
      
      rdar://16178895
      
      llvm-svn: 202427
      95833f33
    • Reid Kleckner's avatar
      MS ABI: Fix vftable mangling by using the vbtable name algorithm · 9c6e9e31
      Reid Kleckner authored
      Summary:
      This merges VFPtrInfo and VBTableInfo into VPtrInfo, since they hold
      almost the same information.  With that change, the vbtable mangling
      code can easily be applied to vftable data and we magically get the
      correct, unambiguous vftable names.
      
      Fixes PR17748.
      
      Reviewers: timurrrr, majnemer
      
      CC: cfe-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2893
      
      llvm-svn: 202425
      9c6e9e31
    • Rafael Espindola's avatar
      Use private linkage for globals we already name with \01L and \01l. · 5179a4ea
      Rafael Espindola authored
      In llvm the only semantic difference between internal and private is that llvm
      tries to hide private globals my mangling them with a private prefix. Since
      the globals changed by this patch already had the magic don't mangle marker,
      there should be no change in the generated assembly.
      
      A followup patch should then be able to drop the \01L and \01l prefixes and let
      llvm mangle as appropriate.
      
      llvm-svn: 202419
      5179a4ea
    • Dmitri Gribenko's avatar
      libclang: New functions clang_Type_getNumTemplateArguments, · 6ede6aba
      Dmitri Gribenko authored
      clang_Type_getTemplateArgument
      
      Note that these functions don't handle variadic templates -- see tests.
      
      Patch by Matthieu Nottale and Philippe Daouadi.
      
      llvm-svn: 202406
      6ede6aba
    • Alexey Bataev's avatar
      1b59ab56
Loading