Skip to content
  1. Feb 22, 2014
    • Warren Hunt's avatar
      Complete Rewrite of CGRecordLayoutBuilder · fb00c887
      Warren Hunt authored
      CGRecordLayoutBuilder was aging, complex, multi-pass, and shows signs of 
      existing before ASTRecordLayoutBuilder.  It redundantly performed many 
      layout operations that are now performed by ASTRecordLayoutBuilder and 
      asserted that the results were the same.  With the addition of support 
      for the MS-ABI, such as placement of vbptrs, vtordisps, different 
      bitfield layout and a variety of other features, CGRecordLayoutBuilder 
      was growing unwieldy in its redundancy.
      
      This patch re-architects CGRecordLayoutBuilder to not perform any 
      redundant layout but rather, as directly as possible, lower an 
      ASTRecordLayout to an llvm::type.  The new architecture is significantly 
      smaller and simpler than the CGRecordLayoutBuilder and contains fewer 
      ABI-specific code paths.  It's also one pass.
      
      The architecture of the new system is described in the comments. For the 
      most part, the new system simply takes all of the fields and bases from 
      an ASTRecordLayout, sorts them, inserts padding and dumps a record. 
      Bitfields, unions and primary virtual bases make this process a bit more 
      complicated.  See the inline comments.
      
      In addition, this patch updates a few lit tests due to the fact that the 
      new system computes more accurate llvm types than CGRecordLayoutBuilder. 
      Each change is commented individually in the review.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2795
      
      llvm-svn: 201907
      fb00c887
    • Ben Langmuir's avatar
      Add a VFSFromYAML class and a parser to create it · d51ba0b3
      Ben Langmuir authored
      Provides a way to create a virtual file system using a YAML file that
      supports mapping a file to a path on an 'external' file system. The
      external file system will typically be the 'real' file system, but for
      testing it can be changed.
      
      A future patch will add a clang option to allow the user to specify such
      a file and overlay it, but for now this code is only exercised by the
      unit tests.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2835
      
      llvm-svn: 201905
      d51ba0b3
    • Warren Hunt's avatar
      Reapply 201734 but with appropriate gcc compatibility · 20e4a5d2
      Warren Hunt authored
      Because GCC incorrectly defines _mm_prefetch to take anything that casts 
      to void*, people have started using that behavior.  The previous patch 
      that made _mm_prefetch actually take a const char * broke compatibility 
      with existing code.  This update to the patch leaves the macro that 
      defines _mm_prefetch with the (void*) cast when _MSC_VER is not defined.
      
      llvm-svn: 201901
      20e4a5d2
  2. Feb 21, 2014
  3. Feb 20, 2014
    • Reid Kleckner's avatar
      Expand macros in pragmas with -fms-extensions and -E · 0e73ec45
      Reid Kleckner authored
      gcc never expands macros in pragmas and MSVC always expands macros
      before processing pragmas.  Clang usually allows macro expansion, except
      in a handful of pragmas, most of which are handled by the lexer.
      
      Also remove PPCallbacks for pragmas that are currently handled in the
      parser.  Without a Parser, such as with clang -E, these callbacks would
      never be called.
      
      Fixes PR18576.
      
      llvm-svn: 201821
      0e73ec45
    • Reid Kleckner's avatar
      Hide pragma handler classes in ParsePragma.cpp · 5b086469
      Reid Kleckner authored
      This reduces the number of files we need to touch to add a new pragma,
      and reduces the number of externally visible symbols in clang.
      
      Make the handlers structs instead of classes because the vast majority
      have no private members.
      
      Reviewers: rsmith
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2834
      
      llvm-svn: 201820
      5b086469
    • Ben Langmuir's avatar
      Recommit virtual file system · c8130a74
      Ben Langmuir authored
      Previously reverted in r201755 due to causing an assertion failure.
      
      I've removed the offending assertion, and taught the CompilerInstance to
      create a default virtual file system inside createFileManager. In the
      future, we should be able to reach into the CompilerInvocation to
      customize this behaviour without breaking clients that don't care.
      
      llvm-svn: 201818
      c8130a74
    • Warren Hunt's avatar
      Enable MSRecordLayout in the presence of external sources. · 2350c867
      Warren Hunt authored
      External sources shouldn't prevent the layout engine from using 
      MSLayout.  If lldb were to support debugging in microsoft mode, some 
      code will need to be added to MSRecordLayoutBuilder to handel external 
      layouts.
      
      llvm-svn: 201810
      2350c867
    • Adrian Prantl's avatar
      Clarify comment. · 0e79c000
      Adrian Prantl authored
      llvm-svn: 201807
      0e79c000
    • Peter Collingbourne's avatar
      Add TemplateSpecializationType polymorphism for hasTemplateArgument and · 564597fd
      Peter Collingbourne authored
      hasAnyTemplateArgument, and (out of necessity) an isExpr matcher.
      
      Also updates the TemplateArgument doxygen to reflect reality for
      non-canonical template arguments.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2810
      
      llvm-svn: 201804
      564597fd
    • Adrian Prantl's avatar
      add a comment. · 259c6178
      Adrian Prantl authored
      llvm-svn: 201801
      259c6178
    • Adrian Prantl's avatar
      Revert "Remove dead option." · 4e2292eb
      Adrian Prantl authored
      Some tests in debuginfo-tests require the system-darwin feature.
      
      This reverts commit 179670.
      
      llvm-svn: 201800
      4e2292eb
    • Jordan Rose's avatar
      [CMake] Fix installation without CLANG_BUILD_EXAMPLES · ee9808df
      Jordan Rose authored
      When CLANG_BUILD_EXAMPLES is not on we set the EXCLUDE_FROM_ALL
      directory property for the examples/ directory to tell CMake not to
      build them by default.  The AddLLVM.cmake APIs are not aware of this and
      try to install targets that are not built.  This does not cause an
      install-time error because CMake excludes the directory from the default
      installation.  However, now that installation attaches targets to the
      LLVMExports export set CMake-based applications that find_package(LLVM)
      fail because the example plugin binary is not available.
      
      Tell the AddLLVM.cmake APIs to exclude the examples from installation by
      setting the EXCLUDE_FROM_ALL variable they check.
      
      Patch by Brad King!
      
      llvm-svn: 201799
      ee9808df
Loading