- Jan 22, 2015
-
-
Chris Bieneman authored
Summary: The default copy and assignment operators for these objects probably don't actually do what the clients intend, so they should be deleted. Places using the assignment operator to set the value of an option should cast to the option's data type first to call into the override for operator=. Places using the copy constructor just need to be changed to not copy (i.e. passing by const reference instead of value). Reviewers: dexonsmith, chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7114 llvm-svn: 226762
-
- Dec 12, 2014
-
-
Yaron Keren authored
In release builds this is actually possible as without asserts there is no testing of the actual read bytes and the variables could be partially uninitialized. llvm-svn: 224114
-
- Dec 03, 2014
-
-
Lang Hames authored
llvm-svn: 223183
-
- Nov 29, 2014
-
-
Duncan P. N. Exon Smith authored
llvm-svn: 222945
-
- Nov 26, 2014
-
-
Lang Hames authored
llvm-svn: 222840
-
Aaron Ballman authored
http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/11753 llvm-svn: 222833
-
Lang Hames authored
Previously, when loading an object file, RuntimeDyld (1) took ownership of the ObjectFile instance (and associated MemoryBuffer), (2) potentially modified the object in-place, and (3) returned an ObjectImage that managed ownership of the now-modified object and provided some convenience methods. This scheme accreted over several years as features were tacked on to RuntimeDyld, and was both unintuitive and unsafe (See e.g. http://llvm.org/PR20722). This patch fixes the issue by removing all ownership and in-place modification of object files from RuntimeDyld. Existing behavior, including debugger registration, is preserved. Noteworthy changes include: (1) ObjectFile instances are now passed to RuntimeDyld by const-ref. (2) The ObjectImage and ObjectBuffer classes have been removed entirely, they existed to model ownership within RuntimeDyld, and so are no longer needed. (3) RuntimeDyld::loadObject now returns an instance of a new class, RuntimeDyld::LoadedObjectInfo, which can be used to construct a modified object suitable for registration with the debugger, following the existing debugger registration scheme. (4) The JITRegistrar class has been removed, and the GDBRegistrar class has been re-written as a JITEventListener. This should fix http://llvm.org/PR20722 . llvm-svn: 222810
-
- Sep 23, 2014
-
-
Lang Hames authored
llvm-svn: 218318
-
Lang Hames authored
This patch removes the old JIT memory manager (which does not provide any useful functionality now that the old JIT is gone), and migrates the few remaining clients over to SectionMemoryManager. http://llvm.org/PR20848 llvm-svn: 218316
-
- Sep 03, 2014
-
-
Eric Christopher authored
Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
-
- Aug 27, 2014
-
-
Rafael Espindola authored
llvm-svn: 216583
-
- Aug 26, 2014
-
-
Rafael Espindola authored
Long term the idea if for the engine to not own the buffers, but for now this is consistent with the rest of the API. llvm-svn: 216484
-
Rafael Espindola authored
llvm-svn: 216466
-
- Aug 25, 2014
-
-
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
-
- Aug 20, 2014
-
-
Rafael Espindola authored
llvm-svn: 216071
-
- Aug 19, 2014
-
-
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
-
Rafael Espindola authored
llvm-svn: 215967
-
- Aug 13, 2014
-
-
Rafael Espindola authored
llvm-svn: 215566
-
Benjamin Kramer authored
Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
-
- Aug 08, 2014
-
-
Eric Christopher authored
be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate. Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reverts commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 215154
-
- Aug 07, 2014
-
-
Rafael Espindola authored
llvm-svn: 215116
-
Rafael Espindola authored
I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! llvm-svn: 215111
-
- Aug 01, 2014
-
-
Rafael Espindola authored
Also fix the error handling. No testcaes, issue found by inspection. Thanks to David Blaikie for the suggestion. llvm-svn: 214535
-
Rafael Espindola authored
llvm-svn: 214533
-
- Jul 31, 2014
-
-
Rafael Espindola authored
llvm-svn: 214377
-
- Jul 14, 2014
-
-
NAKAMURA Takumi authored
llvm-svn: 212920
-
- Jul 06, 2014
-
-
Rafael Espindola authored
llvm-svn: 212405
-
- Jun 24, 2014
-
-
Rafael Espindola authored
Once the objects are constructed, they own the buffer. Passing a unique_ptr makes that clear. llvm-svn: 211595
-
- Jun 13, 2014
-
-
Rafael Espindola authored
llvm-svn: 210876
-
- Jun 12, 2014
-
-
Rafael Espindola authored
This should make sure that most new uses use the std prefix. llvm-svn: 210835
-
- Apr 29, 2014
-
-
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
-
- Apr 28, 2014
-
-
Craig Topper authored
llvm-svn: 207394
-
- Apr 25, 2014
-
-
Craig Topper authored
llvm-svn: 207176
-
- Apr 22, 2014
-
-
Chandler Carruth authored
definition below all of the header #include lines, tools edition. llvm-svn: 206848
-
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
-
- Mar 08, 2014
-
-
Craig Topper authored
llvm-svn: 203345
-
- Mar 06, 2014
-
-
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
-
- Mar 05, 2014
-
-
Ahmed Charles authored
llvm-svn: 202957
-
- Mar 04, 2014
-
-
Chandler Carruth authored
llvm-svn: 202811
-
- Feb 24, 2014
-
-
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
-