Skip to content
  1. Aug 27, 2014
  2. Aug 26, 2014
  3. Aug 25, 2014
    • Rafael Espindola's avatar
      Modernize raw_fd_ostream's constructor a bit. · 3fd1e993
      Rafael Espindola authored
      Take a StringRef instead of a "const char *".
      Take a "std::error_code &" instead of a "std::string &" for error.
      
      A create static method would be even better, but this patch is already a bit too
      big.
      
      llvm-svn: 216393
      3fd1e993
  4. Aug 20, 2014
  5. Aug 19, 2014
    • Rafael Espindola's avatar
      Don't own the buffer in object::Binary. · 48af1c2a
      Rafael Espindola authored
      Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries
      (like Archive) and we had to create dummy buffers just to handle that. It is
      also a bad fit for IRObjectFile where the Module wants to own the buffer too.
      
      Keeping this ownership would make supporting IR inside native objects
      particularly painful.
      
      This patch focuses in lib/Object. If something elsewhere used to own an Binary,
      now it also owns a MemoryBuffer.
      
      This patch introduces a few new types.
      
      * MemoryBufferRef. This is just a pair of StringRefs for the data and name.
        This is to MemoryBuffer as StringRef is to std::string.
      * OwningBinary. A combination of Binary and a MemoryBuffer. This is needed
        for convenience functions that take a filename and return both the
        buffer and the Binary using that buffer.
      
      The C api now uses OwningBinary to avoid any change in semantics. I will start
      a new thread to see if we want to change it and how.
      
      llvm-svn: 216002
      48af1c2a
    • Rafael Espindola's avatar
      2a8a2795
  6. Aug 13, 2014
  7. Aug 08, 2014
  8. Aug 07, 2014
  9. Aug 01, 2014
  10. Jul 31, 2014
  11. Jul 14, 2014
  12. Jul 06, 2014
  13. Jun 24, 2014
  14. Jun 13, 2014
  15. Jun 12, 2014
  16. Apr 29, 2014
    • David Blaikie's avatar
      PR19553: Memory leak in RuntimeDyldELF::createObjectImageFromFile · 7a1e775a
      David Blaikie authored
      This starts in MCJIT::getSymbolAddress where the
      unique_ptr<object::Binary> is release()d and (after a cast) passed to a
      single caller, MCJIT::addObjectFile.
      
      addObjectFile calls RuntimeDyld::loadObject.
      RuntimeDld::loadObject calls RuntimeDyldELF::createObjectFromFile
      
      And the pointer is never owned at this point. I say this point, because
      the alternative codepath, RuntimeDyldMachO::createObjectFile certainly
      does take ownership, so this seemed like a good hint that this was a/the
      right place to take ownership.
      
      llvm-svn: 207580
      7a1e775a
  17. Apr 28, 2014
  18. Apr 25, 2014
  19. Apr 22, 2014
    • Chandler Carruth's avatar
      [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE · f98597a1
      Chandler Carruth authored
      definition below all of the header #include lines, tools edition.
      
      llvm-svn: 206848
      f98597a1
    • Chandler Carruth's avatar
      [Modules] Make Support/Debug.h modular. This requires it to not change · e96dd897
      Chandler Carruth authored
      behavior based on other files defining DEBUG_TYPE, which means it cannot
      define DEBUG_TYPE at all. This is actually better IMO as it forces folks
      to define relevant DEBUG_TYPEs for their files. However, it requires all
      files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't
      already. I've updated all such files in LLVM and will do the same for
      other upstream projects.
      
      This still leaves one important change in how LLVM uses the DEBUG_TYPE
      macro going forward: we need to only define the macro *after* header
      files have been #include-ed. Previously, this wasn't possible because
      Debug.h required the macro to be pre-defined. This commit removes that.
      By defining DEBUG_TYPE after the includes two things are fixed:
      
      - Header files that need to provide a DEBUG_TYPE for some inline code
        can do so by defining the macro before their inline code and undef-ing
        it afterward so the macro does not escape.
      
      - We no longer have rampant ODR violations due to including headers with
        different DEBUG_TYPE definitions. This may be mostly an academic
        violation today, but with modules these types of violations are easy
        to check for and potentially very relevant.
      
      Where necessary to suppor headers with DEBUG_TYPE, I have moved the
      definitions below the includes in this commit. I plan to move the rest
      of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big
      enough.
      
      The comments in Debug.h, which were hilariously out of date already,
      have been updated to reflect the recommended practice going forward.
      
      llvm-svn: 206822
      e96dd897
  20. Mar 08, 2014
  21. Mar 06, 2014
    • Ahmed Charles's avatar
      Replace OwningPtr<T> with std::unique_ptr<T>. · 56440fd8
      Ahmed Charles authored
      This compiles with no changes to clang/lld/lldb with MSVC and includes
      overloads to various functions which are used by those projects and llvm
      which have OwningPtr's as parameters. This should allow out of tree
      projects some time to move. There are also no changes to libs/Target,
      which should help out of tree targets have time to move, if necessary.
      
      llvm-svn: 203083
      56440fd8
  22. Mar 05, 2014
  23. Mar 04, 2014
  24. Feb 24, 2014
    • Rafael Espindola's avatar
      Replace the F_Binary flag with a F_Text one. · 90c7f1cc
      Rafael Espindola authored
      After this I will set the default back to F_None. The advantage is that
      before this patch forgetting to set F_Binary would corrupt a file on windows.
      Forgetting to set F_Text produces one that cannot be read in notepad, which
      is a better failure mode :-)
      
      llvm-svn: 202052
      90c7f1cc
  25. Jan 28, 2014
  26. Jan 24, 2014
    • Alp Toker's avatar
      Fix known typos · cb402911
      Alp Toker authored
      Sweep the codebase for common typos. Includes some changes to visible function
      names that were misspelt.
      
      llvm-svn: 200018
      cb402911
    • Alp Toker's avatar
      Report lli remote IO errors consistently · ad6aa47c
      Alp Toker authored
      This enables IO error reports in both the child and server processes.
      
      The scheme still isn't entirely satisfactory and output is jumbled but it beats
      having no output at all. This will hopefully unblock ARM support (PR18057).
      
      llvm-svn: 200017
      ad6aa47c
  27. Jan 23, 2014
Loading