summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* llvm-readobj: print out the fields of the COFF delay-import tableRui Ueyama2014-10-031-0/+8
| | | | llvm-svn: 218996
* llvm-readobj: print COFF delay-load import tableRui Ueyama2014-10-031-8/+27
| | | | | | | | | This patch adds another iterator to access the delay-load import table and use it from llvm-readobj. http://reviews.llvm.org/D5594 llvm-svn: 218933
* Rename data -> DataRui Ueyama2014-10-021-1/+1
| | | | llvm-svn: 218916
* llvm-readobj: print COFF imported symbolsRui Ueyama2014-10-021-0/+8
| | | | | | | | This patch defines a new iterator for the imported symbols. Make a change to COFFDumper to use that iterator to print out imported symbols and its ordinals. llvm-svn: 218915
* This patch adds a new flag "-coff-imports" to llvm-readobj.Rui Ueyama2014-10-023-0/+24
| | | | | | | | | | | | | | When the flag is given, the command prints out the COFF import table. Currently only the import table directory will be printed. I'm going to make another patch to print out the imported symbols. The implementation of import directory entry iterator in COFFObjectFile.cpp was buggy. This patch fixes that too. http://reviews.llvm.org/D5569 llvm-svn: 218891
* LTO: Ignore disabled diagnostic remarksDuncan P. N. Exon Smith2014-10-011-0/+26
| | | | | | | | | | | | | | | | | | | | | | | r206400 and r209442 added remarks that are disabled by default. However, if a diagnostic handler is registered, the remarks are sent unfiltered to the handler. This is the right behaviour for clang, since it has its own filters. However, the diagnostic handler exposed in the LTO API receives only the severity and message. It doesn't have the information to filter by pass name. For LTO, disabled remarks should be filtered by the producer. I've changed `LLVMContext::setDiagnosticHandler()` to take a `bool` argument indicating whether to respect the built-in filters. This defaults to `false`, so other consumers don't have a behaviour change, but `LTOCodeGenerator::setDiagnosticHandler()` sets it to `true`. To make this behaviour testable, I added a `-use-diagnostic-handler` command-line option to `llvm-lto`. This fixes PR21108. llvm-svn: 218784
* llvm-cov/CoverageReport.cpp: Quick fix for msvcrt, since width specifier "z" ↵NAKAMURA Takumi2014-10-011-12/+12
| | | | | | | | is unavailable. Note, mingw uses its own printf instead of msvcrt. llvm-svn: 218723
* MSBuild integration: fix the loop in install.batHans Wennborg2014-09-302-8/+18
| | | | | | | It would previously not continue the platforms loop unless it could find the latest toolset directory. llvm-svn: 218712
* Extend C disassembler API to allow specifying target featuresBradley Smith2014-09-301-7/+13
| | | | llvm-svn: 218682
* llvm-cov: Use the number of executed functions for the function coverage metric.Alex Lorenz2014-09-304-21/+24
| | | | | | | | This commit fixes llvm-cov's function coverage metric by using the number of executed functions instead of the number of fully covered functions. Differential Revision: http://reviews.llvm.org/D5196 llvm-svn: 218672
* [llvm-objdump] switch some uses of format() to format_hex() and left_justify()Nick Kledzik2014-09-301-29/+26
| | | | llvm-svn: 218649
* WinCOFFObjectWriter: optimize the string table for common sufficesHans Wennborg2014-09-291-2/+2
| | | | | | | | This is a follow-up from r207670 which did the same for ELF. Differential Revision: http://reviews.llvm.org/D5530 llvm-svn: 218636
* llvm-vtabledump: Further simplificationDavid Majnemer2014-09-261-43/+15
| | | | | | | Hoist out calls to getSection and getContents. No functional change intended. llvm-svn: 218550
* Object: BSS/virtual sections don't have contentsDavid Majnemer2014-09-263-5/+11
| | | | | | | | | | | | Users of getSectionContents shouldn't try to pass in BSS or virtual sections. In all instances, this is a bug in the code calling this routine. N.B. Some COFF implementations (like CL) will mark their BSS sections as taking space on disk. This would confuse COFFObjectFile into thinking the section is larger than the file. llvm-svn: 218549
* Update llvm-objdump’s Mach-O symbolizer code to print the name of symbol ↵Kevin Enderby2014-09-261-1/+96
| | | | | | | | | | | | | | | | stubs. So in fully linked images when a call is made through a stub it now gets a comment like the following in the disassembly: callq 0x100000f6c ## symbol stub for: _printf indicating the call is to a symbol stub and which symbol it is for. This is done for branch reference types and seeing if the branch target is in a stub section and if so using the indirect symbol table entry for that stub and using that symbol table entries symbol name. llvm-svn: 218546
* Remove definition of LLVM_VERSION_INFO; this macro is not used by any of theRichard Smith2014-09-262-6/+0
| | | | | | | | | files in this directory. If it should be defined anywhere, it should be defined when building lib/LTO/LTOCodeGenerator.cpp, but we've not had it defined there for quite some time, so that doesn't really seem to be very important. (It also would slow down the modules build by creating extra module variants.) llvm-svn: 218544
* llvm-vtabledump: Small cleanupDavid Majnemer2014-09-261-24/+24
| | | | llvm-svn: 218505
* llvm-vtabledump: strip trailing NUL bytesDavid Majnemer2014-09-261-1/+3
| | | | llvm-svn: 218502
* llvm-vtabledump: Dump RTTI structures for the MS ABIDavid Majnemer2014-09-261-15/+186
| | | | llvm-svn: 218498
* Object: Add range iterators for Archive childrenDavid Majnemer2014-09-251-4/+2
| | | | | | No functional change intended. llvm-svn: 218471
* Since the DisasmMemoryObject only operates on const data, it now only ↵Aaron Ballman2014-09-251-3/+3
| | | | | | accepts a const data pointer. This silences a -Wcast-qual warning. llvm-svn: 218454
* Flush out enough of llvm-objdump’s SymbolizerSymbolLookUp() for Mach-O ↵Kevin Enderby2014-09-243-34/+305
| | | | | | | | | | | | | | | | | | | | | files to get the literal string “Hello world” printed as a comment on the instruction that loads the pointer to it. For now this is just for x86_64. So for object files with relocation entries it produces things like: leaq L_.str(%rip), %rax ## literal pool for: "Hello world\n" and similar for fully linked images like executables: leaq 0x4f(%rip), %rax ## literal pool for: "Hello world\n" Also to allow testing against darwin’s otool(1), I hooked up the existing -no-show-raw-insn option to the Mach-O parser code, added the new Mach-O only -full-leading-addr option to match otool(1)'s printing of addresses and also added the new -print-imm-hex option. llvm-svn: 218423
* [MCJIT] Remove a few more references to JITMemoryManager that survived r218316.Lang Hames2014-09-232-6/+0
| | | | llvm-svn: 218318
* [MCJIT] Delete the JTIMemoryManager and associated APIs.Lang Hames2014-09-235-67/+11
| | | | | | | | | | 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
* llvm-cov: Allow creating CoverageMappings from filenamesJustin Bogner2014-09-201-18/+1
| | | | llvm-svn: 218185
* llvm-cov: Disentangle the coverage data logic from the display (NFC)Justin Bogner2014-09-2012-477/+137
| | | | | | | | | | This splits the logic for actually looking up coverage information from the logic that displays it. These were tangled rather thoroughly so this change is a bit large, but it mostly consists of moving things around. The coverage lookup logic itself now lives in the library, rather than being spread between the library and the tool. llvm-svn: 218184
* llvm-cov: Move some reader debug output out of the tool.Justin Bogner2014-09-201-11/+0
| | | | | | | This debug output is really for testing CoverageMappingReader, not the llvm-cov tool. Move it to where it can be more useful. llvm-svn: 218183
* llvm-readobj: pretty-print special COFF section namesDavid Majnemer2014-09-201-3/+19
| | | | | | Print IMAGE_SYM_DEBUG and the like instead of (-2). llvm-svn: 218172
* llvm-cov: Return unique_ptrs instead of filling objects (NFC)Justin Bogner2014-09-191-53/+62
| | | | | | | Having create* functions return the object they create is more readable than using an in-out parameter. llvm-svn: 218139
* llvm-cov: Fix dropped lines when filters were appliedJustin Bogner2014-09-191-1/+2
| | | | | | | Uncovered lines in the middle of a covered region weren't being shown when filtering to a particular function. llvm-svn: 218109
* llvm-cov: Generalize -filename-equivalenceJustin Bogner2014-09-191-29/+51
| | | | | | | | | | | | | | The filename-equivalence flag allows you to show coverage when your source files don't have the same full paths as those that generated the data. This is mostly useful for writing tests in a cross-platform way. This wasn't triggering in cases where the filename was derived directly from the coverage data, which meant certain types of test case were impossible to write. This patch fixes that, and following patches involve tests that need this. llvm-svn: 218108
* LTO: introduce object file-based on-disk module format.Peter Collingbourne2014-09-182-5/+17
| | | | | | | | | | | | | | | | | | This format is simply a regular object file with the bitcode stored in a section named ".llvmbc", plus any number of other (non-allocated) sections. One immediate use case for this is to accommodate compilation processes which expect the object file to contain metadata in non-allocated sections, such as the ".go_export" section used by some Go compilers [1], although I imagine that in the future we could consider compiling parts of the module (such as large non-inlinable functions) directly into the object file to improve LTO efficiency. [1] http://golang.org/doc/install/gccgo#Imports Differential Revision: http://reviews.llvm.org/D4371 llvm-svn: 218078
* llvm-cov: Simplify FunctionInstantiationSetCollector (NFC)Justin Bogner2014-09-181-28/+15
| | | | | | | | | - Replace std::unordered_map with DenseMap - Use std::pair instead of manually combining two unsigneds - Assert if insert is called with invalid arguments - Avoid an unnecessary copy of a std::vector llvm-svn: 218074
* Alternative (to r216344) fix of gcc -Wpedantic.Patrik Hagglund2014-09-181-1/+1
| | | | | | | | | | | | | | As suggested by David Blaikie, this may be easier to read. The original warning was: ../tools/llvm-cov/llvm-cov.cpp:53:49: error: ISO C++ forbids zero-size array 'argv' [-Werror=pedantic] std::string Invocation(std::string(argv[0]) + " " + argv[1]); It seems to be the case that GCC's warning gets confused and thinks 'argv' is a declaration here. GCC bugzilla issue #61259. llvm-svn: 218048
* llvm-cov: Push some more debug output into the View (NFC)Justin Bogner2014-09-172-24/+4
| | | | llvm-svn: 217984
* Internalize common symbols when we can.Rafael Espindola2014-09-171-1/+3
| | | | | | This fixes pr20974. llvm-svn: 217981
* llvm-cov: Rework the API for getting the coverage of a file (NFC)Justin Bogner2014-09-176-362/+231
| | | | | | | | | | | | This encapsulates how we handle the coverage regions of a file or function. In the old model, the user had to deal with nested regions, so they needed to maintain their own auxiliary data structures to get any useful information out of this. The new API provides a sequence of non-overlapping coverage segments, which makes it possible to render coverage information in a single pass and avoids a fair amount of extra work. llvm-svn: 217975
* LineIterator: Provide a variant that keeps blank linesJustin Bogner2014-09-171-8/+4
| | | | | | | | It isn't always useful to skip blank lines, as evidenced by the somewhat awkward use of line_iterator in llvm-cov. This adds a knob to control whether or not to skip blanks. llvm-svn: 217960
* llvm-cov: Fix a typoJustin Bogner2014-09-171-1/+1
| | | | | | | It doesn't make sense for this default parameter to be false, since false makes the function a no-op. llvm-svn: 217945
* Add move constructors/assignment to make MSVC happy after r217940Justin Bogner2014-09-171-0/+16
| | | | llvm-svn: 217941
* llvm-cov: Distinguish expansion/instantiation from SourceCoverageViewJustin Bogner2014-09-173-113/+108
| | | | | | | | | | | | | SourceCoverageView currently has "Kind" and a list of child views, all of which must have either an expansion or an instantiation Kind. In addition to being an error-prone design, this makes it awkward to differentiate between the two child types and adds a number of optionally used members to the type. Split the subview types into their own separate objects, and maintain lists of each rather than one combined "Children" list. llvm-svn: 217940
* [llvm-objdump] properly use c_str() with format("%s"). Improve ↵Nick Kledzik2014-09-171-2/+2
| | | | | | getLibraryShortNameByIndex() error handling. llvm-svn: 217930
* [llvm-objdump] improve error reporting of bad mach-o ordinalsNick Kledzik2014-09-161-2/+8
| | | | llvm-svn: 217909
* Hookup the MCSymbolizer to llvm-objdump’s disassembly for Mach-O files.Kevin Enderby2014-09-161-1/+183
| | | | | | | | | | | | | | First step done in this commit is to get flush out enough of the SymbolizerGetOpInfo() routine to symbolic an X86_64 hello world .o and its loading of the literal string and call to printf. Also the code to symbolicate the X86_64_RELOC_SUBTRACTOR relocation and a test is also added to show a slightly more complicated case. Next will be to flush out enough of SymbolizerSymbolLookUp() to get the literal string “Hello world” printed as a comment on the instruction that load the pointer to it. llvm-svn: 217893
* llvm-cov: Rename a variable and clean up its usageJustin Bogner2014-09-162-20/+19
| | | | | | | Offset is a terrible name for an indentation / nesting level, and it confuses me every time I look at this code. llvm-svn: 217861
* yaml2obj: Support bigobjDavid Majnemer2014-09-161-21/+73
| | | | | | | | | | | | | | | | Teach yaml2obj how to make a bigobj COFF file. Like the rest of LLVM, we automatically decide whether or not to use regular COFF or bigobj COFF on the fly depending on how many sections the resulting object would have. This ends the task of adding bigobj support to LLVM. N.B. This was tested by forcing yaml2obj to be used in bigobj mode regardless of the number of sections. While a dedicated test was written, the smallest I could make it was 36 MB (!) of yaml and it still took a significant amount of time to execute on a powerful machine. llvm-svn: 217858
* [llvm-objdump] for mach-o add -bind, -lazy-bind, and -weak-bind optionsNick Kledzik2014-09-163-2/+170
| | | | | | | | | | | | | | | | This finishes the ability of llvm-objdump to print out all information from the LC_DYLD_INFO load command. The -bind option prints out symbolic references that dyld must resolve immediately. The -lazy-bind option prints out symbolc reference that are lazily resolved on first use. The -weak-bind option prints out information about symbols which dyld must try to coalesce across images. llvm-svn: 217853
* llvm-cov: Make debug output more consistentJustin Bogner2014-09-152-16/+16
| | | | | | | | This changes the debug output of the llvm-cov tool to consistently write to stderr, and moves the highlighting output closer to where it's relevant. llvm-svn: 217838
* llvm-cov: Fix an issue with showing regions but not countsJustin Bogner2014-09-152-13/+24
| | | | | | | | | | | In r217746, though it was supposed to be NFC, I broke llvm-cov's handling of showing regions without showing counts. This should've shown up in the existing tests, except they were checking debug output that was displayed regardless of what was actually output. I've moved the relevant debug output to a more appropriate place so that the tests catch this kind of thing. llvm-svn: 217835
* MC: Add support for BigObjDavid Majnemer2014-09-154-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | Teach WinCOFFObjectWriter how to write -mbig-obj style object files; these object files allow for more sections inside an object file. Our support for BigObj is notably different from binutils and cl: we implicitly upgrade object files to BigObj instead of asking the user to compile the same file *again* but with another flag. This matches up with how LLVM treats ELF variants. This was tested by forcing LLVM to always emit BigObj files and running the entire test suite. A specific test has also been added. I've lowered the maximum number of sections in a normal COFF file, VS "14" CTP 3 supports no more than 65279 sections. This is important otherwise we might not switch to BigObj quickly enough, leaving us with a COFF file that we couldn't link. yaml2obj support is all that remains to implement. Differential Revision: http://reviews.llvm.org/D5349 llvm-svn: 217812
OpenPOWER on IntegriCloud