summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
* Object: Provide a richer means of describing auxiliary symbolsDavid Majnemer2014-03-19
| | | | | | | | | | | | | | | | The current state of affairs has auxiliary symbols described as a big bag of bytes. This is less than satisfying, it detracts from the YAML file as being human readable. Instead, allow for symbols to optionally contain their auxiliary data. This allows us to have a much higher level way of describing things like weak symbols, function definitions and section definitions. This depends on D3105. Differential Revision: http://llvm-reviews.chandlerc.com/D3092 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204214 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Move auxiliary symbol definitions from llvm-readobjDavid Majnemer2014-03-19
| | | | | | | | | | | | Summary: These definitions are useful to other aspects of LLVM, move them out. Reviewers: rafael, nrieck, ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3105 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204213 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-profdata: Make "merge" into a subcommand.Justin Bogner2014-03-19
| | | | | | We'll be adding a few more subcommands in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204211 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-profdata: Update to use the naive text format with function hashJustin Bogner2014-03-19
| | | | | | This also uses line_iterator to simplify the parsing logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204210 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Add function to check if section number is reserved one.Rui Ueyama2014-03-18
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D3103 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204199 91177308-0d34-0410-b5e6-96231b3b80d8
* Darwin: Add assembler directives to create version-min load commands.Jim Grosbach2014-03-18
| | | | | | | | | | | | Allow object files to be tagged with a version-min load command for iOS or MacOSX. Teach macho-dump to understand the version-min load commands for testcases. rdar://11337778 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204190 91177308-0d34-0410-b5e6-96231b3b80d8
* Use early returns to reduce nesting.Rui Ueyama2014-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204171 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make ↵Alexey Samsonov2014-03-18
| | | | | | | | | | | | | | it work with range-based for loops. Reviewers: ruiu Reviewed By: ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3097 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204120 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Introduce ObjectFile::symbols() to use range-based loops.Alexey Samsonov2014-03-17
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3081 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204031 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-readobj: Print referred symbol name for CLR token definitionNico Rieck2014-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204024 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-readobj: Add test for COFF auxiliary symbols as used by C++/CLINico Rieck2014-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204023 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: Make error_category's constructor publicJustin Bogner2014-03-15
| | | | | | | | Since our error_category is based on the std one, we should have the same visibility for the constructor. This also allows us to avoid using the _do_message implementation detail in our own categories. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203998 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: change data type of SymbolNumber from int16 to uint16.Rui Ueyama2014-03-15
| | | | | | | | | | | | Microsoft PE/COFF Spec clearly states that the field is of signed interger type. However, in reality, it's unsigned. If cl.exe needs to create a large number of sections for COMDAT sections, it will just create more than 32768 sections. Handling large section number as negative number is not correct. I think this is a spec bug. Differential Revision: http://llvm-reviews.chandlerc.com/D3088 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203986 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug introduced during the transition to PathV2.Rafael Espindola2014-03-14
| | | | | | | | | sys::fs::createUniqueFile returns an absolute path, so MakeSharedObject does too and we don't need to add a './' prefix. Patch by Jon McLachlan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203931 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Introduce SectionRef::relocations() to use range-based loopsAlexey Samsonov2014-03-14
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3077 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203927 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Use range-based for loops.Simon Atanasyan2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203900 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Refer to a section in the error message by its name notSimon Atanasyan2014-03-14
| | | | | | index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203899 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Remove unused ELFState class field.Simon Atanasyan2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203898 91177308-0d34-0410-b5e6-96231b3b80d8
* [yaml2obj][ELF] Assign name (.shstrtab) to the section holds sections names.Simon Atanasyan2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203897 91177308-0d34-0410-b5e6-96231b3b80d8
* static link polly into toolsSebastian Pop2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203886 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use ObjectFile::sections() in commandline llvm toolsAlexey Samsonov2014-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203802 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out Profile library and dependent commitsJustin Bogner2014-03-12
| | | | | | | | | Chandler voiced some concern with checking this in without some discussion first. Reverting for now. This reverts r203703, r203704, r203708, and 203709. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203723 91177308-0d34-0410-b5e6-96231b3b80d8
* Profile: Remove an inefficient and unnecessary API functionJustin Bogner2014-03-12
| | | | | | | This was leftover from an approach I abandoned, but I forgot to update it before committing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203708 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-profdata: Use the Profile library, implement show and generateJustin Bogner2014-03-12
| | | | | | | | This replaces the llvm-profdata tool with a version that uses the recently introduced Profile library. The new tool has the ability to generate and summarize profdata files as well as merging them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203704 91177308-0d34-0410-b5e6-96231b3b80d8
* Move duplicated code into a helper function (exposed through overload).Eli Bendersky2014-03-12
| | | | | | | | | | | | | | | | | | | There's a bit of duplicated "magic" code in opt.cpp and Clang's CodeGen that computes the inliner threshold from opt level and size opt level. This patch moves the code to a function that lives alongside the inliner itself, providing a convenient overload to the inliner creation. A separate patch can be committed to Clang to use this once it's committed to LLVM. Standalone tools that use the inlining pass can also avoid duplicating this code and fearing it will go out of sync. Note: this patch also restructures the conditinal logic of the computation to be cleaner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203669 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: rename ARMV7 to ARMNTSaleem Abdulrasool2014-03-11
| | | | | | | The official specifications state the name to be ARMNT (as per the Microsoft Portable Executable and Common Object Format Specification v8.3). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203530 91177308-0d34-0410-b5e6-96231b3b80d8
* fix polly buildbotSebastian Pop2014-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203492 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR13550: add a cmake WITH_POLLY optionSebastian Pop2014-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203486 91177308-0d34-0410-b5e6-96231b3b80d8
* [PM] Switch new pass manager from polymorphic_ptr to unique_ptr now thatChandler Carruth2014-03-09
| | | | | | | it is available. Also make the move semantics sufficiently correct to tolerate move-only passes, as the PassManagers *are* move-only passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203391 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add range based accessors for the Use-Def chain of a Value.Chandler Carruth2014-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires a number of steps. 1) Move value_use_iterator into the Value class as an implementation detail 2) Change it to actually be a *Use* iterator rather than a *User* iterator. 3) Add an adaptor which is a User iterator that always looks through the Use to the User. 4) Wrap these in Value::use_iterator and Value::user_iterator typedefs. 5) Add the range adaptors as Value::uses() and Value::users(). 6) Update *all* of the callers to correctly distinguish between whether they wanted a use_iterator (and to explicitly dig out the User when needed), or a user_iterator which makes the Use itself totally opaque. Because #6 requires churning essentially everything that walked the Use-Def chains, I went ahead and added all of the range adaptors and switched them to range-based loops where appropriate. Also because the renaming requires at least churning every line of code, it didn't make any sense to split these up into multiple commits -- all of which would touch all of the same lies of code. The result is still not quite optimal. The Value::use_iterator is a nice regular iterator, but Value::user_iterator is an iterator over User*s rather than over the User objects themselves. As a consequence, it fits a bit awkwardly into the range-based world and it has the weird extra-dereferencing 'operator->' that so many of our iterators have. I think this could be fixed by providing something which transforms a range of T&s into a range of T*s, but that *can* be separated into another patch, and it isn't yet 100% clear whether this is the right move. However, this change gets us most of the benefit and cleans up a substantial amount of code around Use and User. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203364 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-08
| | | | | | class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203345 91177308-0d34-0410-b5e6-96231b3b80d8
* [bugpoint] Don't ignore arg in -compile-commad="tool arg"Adam Nemet2014-03-08
| | | | | | | Args is an output parameter of the function lexCommand but the reference operator was missed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203343 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing std:: qualifiersDmitri Gribenko2014-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203246 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MCDisassembler::setSymbolizer to take unique_ptr by value.Ahmed Charles2014-03-07
| | | | | | | This changes the interface to be more explicit that ownership is being transferred. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203223 91177308-0d34-0410-b5e6-96231b3b80d8
* Support: split object format out of environmentSaleem Abdulrasool2014-03-06
| | | | | | | | | | | This is a preliminary setup change to support a renaming of Windows target triples. Split the object file format information out of the environment into a separate entity. Unfortunately, file format was previously treated as an environment with an unknown OS. This is most obvious in the ARM subtarget where the handling for macho on an arbitrary platform switches to AAPCS rather than APCS (as per Apple's needs). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203160 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warning about mismatched signs in comparison.Rafael Espindola2014-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203155 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the printing of n_type.Rafael Espindola2014-03-06
| | | | | | | Despite the name, n_type contains the type of the symbol, but also if it is extern or private extern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203154 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the existing N_STAB from the MachO namespace.Rafael Espindola2014-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203152 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-06
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8
* [Layering] Sink Linker.h into a Linker subdirectory to make itChandler Carruth2014-03-06
| | | | | | consistent with every other sub-library header in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203065 91177308-0d34-0410-b5e6-96231b3b80d8
* [Layering] Move InstVisitor.h into the IR library as it is prettyChandler Carruth2014-03-06
| | | | | | obviously coupled to the IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203064 91177308-0d34-0410-b5e6-96231b3b80d8
* [Layering] Move DebugInfo.h into the IR library where its implementationChandler Carruth2014-03-06
| | | | | | already lives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203046 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to unbreak little-endian buildbots.Rui Ueyama2014-03-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203023 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202957 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Indent unwind info contents.Rui Ueyama2014-03-04
| | | | | | | | | | | Unwind info contents were indented at the same level as function table contents. That's a bit confusing because the unwind info is pointed by function table. In other places we usually increment indentation depth by one when dereferncing a pointer. This patch also removes extraneous newlines between function tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202879 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Fix typo in output.Rui Ueyama2014-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202875 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove out-of-date comment in llvm/tools/CMakeLists.txt.NAKAMURA Takumi2014-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202857 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Move the PassNameParser to the IR library as it deals in theChandler Carruth2014-03-04
| | | | | | | PassInfo structures of the legacy pass manager. Also give it the Legacy prefix as it is not a particularly widely used header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202839 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Move CFG.h to the IR library as it defines graph traits overChandler Carruth2014-03-04
| | | | | | IR types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202827 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] Move ValueMap to the IR library. While this class does notChandler Carruth2014-03-04
| | | | | | | | | | | | directly care about the Value class (it is templated so that the key can be any arbitrary Value subclass), it is in fact concretely tied to the Value class through the ValueHandle's CallbackVH interface which relies on the key type being some Value subclass to establish the value handle chain. Ironically, the unittest is already in the right library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202824 91177308-0d34-0410-b5e6-96231b3b80d8