Skip to content
  1. Apr 13, 2012
    • Dan Gohman's avatar
      Def here is an Instruction, so !isa<Instruction>(Def) is always false, · 4f8ced58
      Dan Gohman authored
      as Eli noticed.
      
      llvm-svn: 154641
      4f8ced58
    • Richard Smith's avatar
      Implement the missing pieces needed to support libstdc++4.7's <atomic>: · 01ba47d7
      Richard Smith authored
      __atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_*
      predefined macros.
      
      Implement library fallback for __atomic_is_lock_free and
      __c11_atomic_is_lock_free, and implement __atomic_always_lock_free.
      
      Contrary to their documentation, GCC's __atomic_fetch_add family don't
      multiply the operand by sizeof(T) when operating on a pointer type.
      libstdc++ relies on this quirk. Remove this handling for all but the
      __c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins.
      
      Contrary to their documentation, __atomic_test_and_set and __atomic_clear
      take a first argument of type 'volatile void *', not 'void *' or 'bool *',
      and __atomic_is_lock_free and __atomic_always_lock_free have an argument
      of type 'const volatile void *', not 'void *'.
      
      With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite,
      except for a couple of libstdc++ bugs and some cases where libc++'s test
      suite tests for properties which implementations have latitude to vary.
      
      llvm-svn: 154640
      01ba47d7
    • Johnny Chen's avatar
    • Greg Clayton's avatar
      Added more complete error checking for mutexes only for "Debug" builds where... · ce7d345a
      Greg Clayton authored
      Added more complete error checking for mutexes only for "Debug" builds where we always check if a mutex is valid prior to doing stuff with it. We also track when mutexes are initialized and destroyed and keep these in sets that can very subsequent pthread_mutex_XXX API calls.
      
      llvm-svn: 154637
      ce7d345a
    • Johnny Chen's avatar
    • Johnny Chen's avatar
      Fix some test suite errors. TestForwardDecl.py errors were due to bad... · 45872c01
      Johnny Chen authored
      Fix some test suite errors.  TestForwardDecl.py errors were due to bad Makefile.rules, while TestHiddenIvars.py errors due to features only available in modern objc runtime.
      
      llvm-svn: 154635
      45872c01
    • Sean Callanan's avatar
      Added a mechanism for keeping track of where in · 60217120
      Sean Callanan authored
      the debug information individual Decls came from.
      
      We've had a metadata infrastructure for a while,
      which was intended to solve a problem we've since
      dealt with in a different way.  (It was meant to
      keep track of which definition of an Objective-C
      class was the "true" definition, but we now find
      it by searching the symbols for the class symbol.)
      The metadata is attached to the ExternalASTSource,
      which means it has a one-to-one correspondence with
      AST contexts.
      
      I've repurposed the metadata infrastructure to
      hold the object file and DIE offset for the DWARF
      information corresponding to a Decl.  There are
      methods in ClangASTContext that get and set this
      metadata, and the ClangASTImporter is capable of
      tracking down the metadata for Decls that have been
      copied out of the debug information into the
      parser's AST context without using any additional
      memory.
      
      To see the metadata, you just have to enable the
      expression log:
      -
      (lldb) log enable lldb expr
      -
      and watch the import messages.  The high 32 bits
      of the metadata indicate the index of the object
      file in its containing DWARFDebugMap; I have also
      added a log which you can use to track that mapping:
      -
      (lldb) log enable dwarf map
      -
      
      This adds 64 bits per Decl, which in my testing
      hasn't turned out to be very much (debugging Clang
      produces around 6500 Decls in my tests).  To track
      how much data is being consumed, I've also added a
      global variable g_TotalSizeOfMetadata which tracks
      the total number of Decls that have metadata in all
      active AST contexts.
      
      Right now this metadata is enormously useful for
      tracking down bugs in the debug info parser.  In the
      future I also want to use this information to provide
      more intelligent error messages instead of printing
      empty source lines wherever Clang refers to the
      location where something is defined.
      
      llvm-svn: 154634
      60217120
    • Greg Clayton's avatar
      Expose GetAddressClass() from both the SBAddress and SBInstruction so clients... · c8e0c244
      Greg Clayton authored
      Expose GetAddressClass() from both the SBAddress and SBInstruction so clients can tell the difference between ARM/Thumb opcodes when disassembling ARM.
      
      llvm-svn: 154633
      c8e0c244
    • Fariborz Jahanian's avatar
      objective-c modern translator: beautify rewrite of · 27db0b37
      Fariborz Jahanian authored
      struct __rw_objc_super; no functionality change.
      
      llvm-svn: 154632
      27db0b37
    • Dan Gohman's avatar
      Add forms of dominates and isReachableFromEntry that accept a Use · 73273275
      Dan Gohman authored
      directly instead of a user Instruction. This allows them to test
      whether a def dominates a particular operand if the user instruction
      is a PHI.
      
      llvm-svn: 154631
      73273275
    • Daniel Dunbar's avatar
      0d400304
    • Kevin Enderby's avatar
      Fix a few more places in the ARM disassembler so that branches get · 40d4e470
      Kevin Enderby authored
      symbolic operands added when using the C disassembler API.
      
      llvm-svn: 154628
      40d4e470
    • Sean Callanan's avatar
      Fixed a problem where LLDB inserted regular C · 02eee4d4
      Sean Callanan authored
      FunctionDecls into classes if it looked up a
      method in a different DWARF context than the
      one where it found the parent class's definition.
      
      The symptom of this was, for a method A::B(),
      
      1) LLDB finds A in context 1, creating a
         CXXRecordDecl for A and marking it as needing
         completion
      
      2) LLDB looks up B in context 2, finds that its
         parent A already has a CXXRecordDecl, but can't
         find a CXXMethodDecl for B
      
      3) Not finding a CXXMethodDecl for B, LLDB doesn't
         set the flag indicating that B was resolved
      
      4) Because the flag wasn't set, LLDB's fallthrough
         code creates a FunctionDecl for B and sticks it
         in the DeclContext -- in this case, A.
      
      5) Clang crashes on finding a FunctionDecl inside a
         CXXRecordDecl.
      
      llvm-svn: 154627
      02eee4d4
    • David Blaikie's avatar
      Warn on 64-to-32 for source value of x bits where 64 >= x > 32. · 9455da0e
      David Blaikie authored
      The codepath already only works for source bits > target bits, it's just that
      it was testing for the source expr bits to be exactly 64. This meant simple
      cases (int i = x_long / 2) were missed & ended up under the general
      -Wconversion warning, which a user might not have enabled.
      
      llvm-svn: 154626
      9455da0e
    • Anna Zaks's avatar
      [analyzer] PCH deserialization optimization. · 8e078528
      Anna Zaks authored
      We should not deserialize unused declarations from the PCH file. Achieve
      this by storing the top level declarations during parsing
      (HandleTopLevelDecl ASTConsumer callback) and analyzing/building a call
      graph only for those.
      
      Tested the patch on a sample ObjC file that uses PCH. With the patch, 
       the analyzes is 17.5% faster and clang consumes 40% less memory.
      Got about 10% overall build/analyzes time decrease on a large Objective
      C project.
      
      A bit of CallGraph refactoring/cleanup as well..
      
      llvm-svn: 154625
      8e078528
    • Anna Zaks's avatar
      [analyzer] Test case for r154451 (redefining system functions). · 9fcb0559
      Anna Zaks authored
      llvm-svn: 154624
      9fcb0559
    • Ted Kremenek's avatar
      Update CMake build. · 967aaa95
      Ted Kremenek authored
      llvm-svn: 154622
      967aaa95
  2. Apr 12, 2012
Loading