summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Change the llvm-obdump(1) behavior with the -macho flag and inappropriate ↵Kevin Enderby2017-01-301-2/+7
| | | | | | | | | | | | | | | | | | file types. To better match the old darwin otool(1) behavior, when llvm-obdump(1) is used with the -macho option and the input file is not an object file simply print the file name and this message: foo: is not an object file and continue on to process other input files. Also in this case don’t exit non-zero. This should help in some OSS projects' with autoconf scripts that are expecting the old darwin otool(1) behavior. rdar://26828015 llvm-svn: 293547
* Remove unused 'using' declaration. Found by clang-tidy: ↵Sylvestre Ledru2017-01-281-1/+0
| | | | | | misc-unused-using-decls NFC llvm-svn: 293382
* Cleanup dump() functions.Matthias Braun2017-01-283-5/+6
| | | | | | | | | | | | | | | | | | We had various variants of defining dump() functions in LLVM. Normalize them (this should just consistently implement the things discussed in http://lists.llvm.org/pipermail/cfe-dev/2014-January/034323.html For reference: - Public headers should just declare the dump() method but not use LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - The definition of a dump method should look like this: #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MyClass::dump() { // print stuff to dbgs()... } #endif llvm-svn: 293359
* NFC: Rename PDB_ReaderType::Raw to Native for consistency with the ↵Adrian McCarthy2017-01-271-2/+2
| | | | | | NativeSession rename. llvm-svn: 293235
* [obj2yaml] Produce correct output for invalid relocations.Davide Italiano2017-01-261-4/+12
| | | | | | | | | | | | R_X86_64_NONE can be emitted without a symbol associated (well, in theory it should never be emitted in an ABI-compliant relocatable object). So, if there's no symbol associated to a reloc, emit one with an empty name, instead of crashing. Ack'ed by Michael Spencer offline. PR: 31768 llvm-svn: 293224
* Replace addEarlyAsPossiblePasses callback with adjustPassManagerStanislav Mekhanoshin2017-01-261-6/+1
| | | | | | | | | | | | | | This change introduces adjustPassManager target callback giving a target an opportunity to tweak PassManagerBuilder before pass managers are populated. This generalizes and replaces addEarlyAsPossiblePasses target callback. In particular that can be used to add custom passes to extension points other than EP_EarlyAsPossible. Differential Revision: https://reviews.llvm.org/D28336 llvm-svn: 293189
* gold-plugin: Simplify naming of object files created with save-temps or ↵Peter Collingbourne2017-01-261-5/+4
| | | | | | | | | | obj-path. Now we never append a number to the file name for task ID 0. Differential Revision: https://reviews.llvm.org/D29160 llvm-svn: 293132
* Fix --Wunused-function.Rui Ueyama2017-01-261-5/+0
| | | | llvm-svn: 293131
* [llc] Add -pass-remarks-outputAdam Nemet2017-01-261-0/+21
| | | | | | | This is the opt/llc counterpart of -fsave-optimization-record to output optimization remarks in a YAML file. llvm-svn: 293121
* [llc] Add -pass-remarks-with-hotnessAdam Nemet2017-01-251-0/+7
| | | | | | Analogous to the code in opt, this enables hotness in opt-remarks. llvm-svn: 293113
* New OptimizationRemarkEmitter pass for MIRAdam Nemet2017-01-251-0/+4
| | | | | | | | | | | | | | | | | This allows MIR passes to emit optimization remarks with the same level of functionality that is available to IR passes. It also hooks up the greedy register allocator to report spills. This allows for interesting use cases like increasing interleaving on a loop until spilling of registers is observed. I still need to experiment whether reporting every spill scales but this demonstrates for now that the functionality works from llc using -pass-remarks*=<pass>. Differential Revision: https://reviews.llvm.org/D29004 llvm-svn: 293110
* NFC: Rename (PDB) RawSession to NativeSessionAdrian McCarthy2017-01-256-36/+36
| | | | | | | | This eliminates one overload on the term Raw. Differential Revision: https://reviews.llvm.org/D29098 llvm-svn: 293104
* Add a warning when the llvm-nm -print-size flag is used on a Mach-O file asKevin Enderby2017-01-251-3/+18
| | | | | | | | | | | | Mach-O files don’t have size information about the symbols in the object file format unlike ELF. Also add the part of the fix to llvm-nm that was missed with r290001 so -arch armv7m works. rdar://25681018 llvm-svn: 293099
* [pdb] Correctly parse the hash adjusters table from TPI stream.Zachary Turner2017-01-251-58/+80
| | | | | | | | | | | | | This is not a list of pairs, it is a hash table data structure. We now correctly parse this out and dump it from llvm-pdbdump. We still need to understand the conditions that lead to a type getting an entry in the hash adjuster table. That will be done in a followup investigation / patch. Differential Revision: https://reviews.llvm.org/D29090 llvm-svn: 293090
* [AMDGPU] Bump up n_type for metadata v2Konstantin Zhuravlyov2017-01-251-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D29115 llvm-svn: 293083
* Implemented color coding and Vertex labels in XRay GraphDean Michael Berris2017-01-252-89/+345
| | | | | | | | | | | | | | | | | | Summary: A patch to enable the llvm-xray graph subcommand to color edges and vertices based on statistics and to annotate vertices with statistics. Depends on D27243 Reviewers: dblaikie, dberris Reviewed By: dberris Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28225 llvm-svn: 293031
* gold-plugin: Add the file path to the file open error diagnostic.Peter Collingbourne2017-01-251-1/+2
| | | | llvm-svn: 293013
* Add support for the x86_thread_state32_t andKevin Enderby2017-01-231-1/+98
| | | | | | | | | | | | | in llvm-objdump for Mach-O files add the printing of the x86_thread_state32_t in the same format as otool-classic(1) on darwin. To do this the 32-bit x86 general tread state needed to be defined in include/llvm/Support/MachO.h . rdar://30110111 llvm-svn: 292829
* Add LC_BUILD_VERSION load commandSteven Wu2017-01-234-1/+87
| | | | | | | | | | | | | | | | | | | Summary: Add a new load command LC_BUILD_VERSION. It is a generic version of LC_*_VERSION_MIN load_command used on Apple platforms. Instead of having a seperate load command for each platform, LC_BUILD_VERSION is recording platform info as an enum. It also records SDK version, min_os, and tools that used to build the binary. rdar://problem/29781291 Reviewers: enderby Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29044 llvm-svn: 292824
* llvm-cxxfilt: support `-_`Saleem Abdulrasool2017-01-221-6/+23
| | | | | | | | Add the `--strip-underscore` option to llvm-cxxfilt to strip the leading underscore. This is useful for when dealing with targets which add a leading underscore. llvm-svn: 292759
* llvm-strings: remove default for -Wcovered-switch-defaultSaleem Abdulrasool2017-01-211-1/+0
| | | | | | | Fix the -Werror build by removing the unnecessary default case in the covered switch. NFC llvm-svn: 292708
* llvm-strings: add support for `-t`Saleem Abdulrasool2017-01-211-5/+30
| | | | | | Allow printing the file content offset via the `-t` or `--radix` option. llvm-svn: 292707
* llvm-cxxfilt: support the `-s` optionSaleem Abdulrasool2017-01-211-0/+19
| | | | | | | | | | This is a stub implementation of the `-s` or `--format` option that allows the user to specify the demangling style. Since we only support the Itanium (GNU) style demangling, auto is synonymous with `gnu`. Simply swallow the option to permit some level of commandline compatibility. llvm-svn: 292706
* [pdb] Write the Named Stream mapping to Yaml and binary.Zachary Turner2017-01-208-9/+73
| | | | | | Differential Revision: https://reviews.llvm.org/D28919 llvm-svn: 292665
* [pdb] Merge NamedStreamMapBuilder and NamedStreamMap.Zachary Turner2017-01-201-2/+1
| | | | | | | | | | | While the builder pattern has proven useful for certain other larger types, in this case it was hampering the ability to use the data structure, as for runtime access we need a map that we can efficiently read from and write to. So the two are merged into a single data structure that can efficiently be read to, written from, deserialized from bytes, and serialized to bytes. llvm-svn: 292664
* llvm-cxxfilt: add missing includes from previous changeSaleem Abdulrasool2017-01-201-0/+2
| | | | llvm-svn: 292580
* llvm-cxxfilt: fix program descriptionSaleem Abdulrasool2017-01-201-1/+4
| | | | | | | | Fix a silly copy-paste error in the tool description. Take the opportunity to add crash stack printing which will hopefully never be needed. llvm-svn: 292579
* llvm-cxxfilt: support `-t` to demangle typesSaleem Abdulrasool2017-01-201-5/+18
| | | | | | | | By default c++filt demangles functions, though you can optionally pass `-t` to have it decode types as well, behaving nearly identical to `__cxa_demangle`. Add support for this mode. llvm-svn: 292576
* Add support for the new LC_NOTE load command.Kevin Enderby2017-01-191-0/+16
| | | | | | | | | | It describes a region of arbitrary data included in a Mach-O file. Its initial use is to record extra data in MH_CORE files. rdar://30001545 rdar://30001731 llvm-svn: 292500
* [sancov] applying blacklist to covered points tooMike Aizatsky2017-01-191-0/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D28872 llvm-svn: 292468
* llvm-cxxfilt: filter out invalid manglingsSaleem Abdulrasool2017-01-191-3/+6
| | | | | | | | | | c++filt does not attempt to demangle symbols which do not match its expected format. This means that the symbol must start with _Z or ___Z (block invocation function extension). Any other symbols are returned as is. Note that this is different from the behaviour of __cxa_demangle which will demangle fragments. llvm-svn: 292467
* [ARM] Create objdump subtarget from build attrsSam Parker2017-01-182-3/+20
| | | | | | | | | | | Enable an ELFObjectFile to read the its arm build attributes to produce a target triple with a specific ARM architecture. llvm-objdump now uses this functionality to automatically produce a more accurate target. Differential Revision: https://reviews.llvm.org/D28769 llvm-svn: 292366
* Remove pid_t usage from llvm-xrayPavel Labath2017-01-171-1/+3
| | | | | | This type is not available on windows. llvm-svn: 292206
* llc: Update link componentsMatt Arsenault2017-01-171-0/+1
| | | | llvm-svn: 292198
* llc: Update LLVMBuildMatt Arsenault2017-01-171-1/+1
| | | | llvm-svn: 292196
* llc: Initialize more passesMatt Arsenault2017-01-171-0/+2
| | | | | | | Targets can add these. Initialize them so -print-before/-print-after etc. work. llvm-svn: 292195
* [llvm-objdump] Dump PT_NOTE as part of -p.Davide Italiano2017-01-161-0/+3
| | | | | PR: 31641 llvm-svn: 292170
* [llvm-objdump] Dump PT_GNU_RELRO as part of -p.Davide Italiano2017-01-161-0/+3
| | | | | PR: 31641 llvm-svn: 292169
* [llvm-objdump] Dump PT_OPENBSD_{BOOTDATA,RANDOMIZE,WXNEEDED}.Davide Italiano2017-01-161-0/+9
| | | | | PR: 31641 llvm-svn: 292167
* Add missing header to see if that clears up the buildDavid Blaikie2017-01-161-0/+1
| | | | llvm-svn: 292166
* Attempt to fix the MSVC build by using llvm::errc instead of std::errcDavid Blaikie2017-01-161-4/+4
| | | | llvm-svn: 292163
* [XRay] Implement the `llvm-xray graph` subcommandDavid Blaikie2017-01-163-0/+495
| | | | | | | | | | | | Here we define the `graph` subcommand which generates a graph from the function call information and uses it to present the call information graphically with additional annotations. Reviewers: dblaikie, dberris Differential Revision: https://reviews.llvm.org/D27243 llvm-svn: 292156
* [llvm-xray] Fix android buildPavel Labath2017-01-161-1/+2
| | | | | | | | | std::to_string is not available in the android ndk. Using llvm::to_string instead. Committing as obvious. llvm-svn: 292143
* Fix un-initialized error introduced by r291959.Daniel Jasper2017-01-151-0/+2
| | | | | | | | This is uncovered when running tools/dsymutil/X86/empty_range.s.test with ASAN. Haven't investigate yet, whether that means there is an ODR violation in that test. llvm-svn: 292065
* Add a variant of DWARFDie::find() and DWARFDie::findRecursively() that takes ↵Greg Clayton2017-01-131-7/+5
| | | | | | | | | | a llvm::ArrayRef<dwarf::Attribute>. This allows us efficiently look for more than one attribute, something that is quite common in DWARF consumption. Differential Revision: https://reviews.llvm.org/D28704 llvm-svn: 291967
* Cleanup how DWARFDie attributes are accessed and decoded.Greg Clayton2017-01-132-48/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed all DWARFDie::getAttributeValueAs*() calls. Renamed: Optional<DWARFFormValue> DWARFDie::getAttributeValue(dwarf::Attribute); To: Optional<DWARFFormValue> DWARFDie::find(dwarf::Attribute); Added: Optional<DWARFFormValue> DWARFDie::findRecursively(dwarf::Attribute); All decoding of Optional<DWARFFormValue> values are now done using the dwarf::to*() functions from DWARFFormValue.h: Old code: auto DeclLine = DWARFDie.getAttributeValueAsSignedConstant(DW_AT_decl_line).getValueOr(0); New code: auto DeclLine = toUnsigned(DWARFDie.find(DW_AT_decl_line), 0); This composition helps us since we can now easily do: auto DeclLine = toUnsigned(DWARFDie.findRecursively(DW_AT_decl_line), 0); This allows us to easily find attribute values in the current DIE only (the first new code above) or in any DW_AT_abstract_origin or DW_AT_specification Dies using the line above. Note that the code line length is shorter and more concise. Differential Revision: https://reviews.llvm.org/D28581 llvm-svn: 291959
* Revert r291903 and r291898. Reason: they break check-lld on the bots.Ivan Krasin2017-01-132-20/+3
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Revert [ARM] Fix ubig32_t read in ARMAttributeParser Now using support functions to read data instead of trying to perform casts. =========================================================== Revert [ARM] Enable objdump to construct triple for ARM Now that The ARMAttributeParser has been moved into the library, it has been modified so that it can parse the attributes without printing them and stores them in a map. ELFObjectFile now queries the attributes to fill out the architecture details of a provided triple for 'arm' and 'thumb' targets. llvm-objdump uses this new functionality. Subscribers: llvm-commits, samparker, aemerson, mgorny Differential Revision: https://reviews.llvm.org/D28683 llvm-svn: 291911
* [llvm-dwp] - Reuse object::Decompressor classGeorge Rimar2017-01-131-31/+24
| | | | | | | | One more place where Decompressor class can be reused. Differential revision: https://reviews.llvm.org/D28679 llvm-svn: 291906
* [ARM] Enable objdump to construct triple for ARMSam Parker2017-01-132-3/+20
| | | | | | | | | | | | | Now that The ARMAttributeParser has been moved into the library, it has been modified so that it can parse the attributes without printing them and stores them in a map. ELFObjectFile now queries the attributes to fill out the architecture details of a provided triple for 'arm' and 'thumb' targets. llvm-objdump uses this new functionality. Differential Revision: https://reviews.llvm.org/D28281 llvm-svn: 291898
* [ARM] Moved ARMAttributeParser to SupportSam Parker2017-01-134-810/+1
| | | | | | | | | Moved ARMAttributeParser out of llvm-readobj and into the support library. Differential Revision: https://reviews.llvm.org/D28227 llvm-svn: 291896
OpenPOWER on IntegriCloud