- Jun 29, 2016
-
-
Rafael Espindola authored
This fixes pr28072. The point, as Duncan pointed out, is that the file is already partially linked by just reading it. Long term I think the solution is to make metadata owned by the module and then the linker will lazily read it and be in charge of all the linking. Running a verifier in each input will defeat the lazy loading, but will be legal. Right now we are at the unfortunate position that to support odr merging we cannot verify the inputs, which mildly annoying (see test update). llvm-svn: 274148
-
Vedant Kumar authored
llvm-svn: 274139
-
Vedant Kumar authored
In -output-dir mode, file reports are placed into a "coverage" directory. If filenames in the coverage mapping contain "..", they might escape out of this directory. Fix the problem by removing ".." from source filenames (expand the path component). llvm-svn: 274135
-
Philip Reames authored
llvm-svn: 274093
-
Philip Reames authored
llvm-svn: 274092
-
Philip Reames authored
And remove the use of a label(!) in the process. llvm-svn: 274087
-
Vedant Kumar authored
- Add renderView{Header,Footer}, renderLineSuffix, and hasSubViews to support creating tables with nested views. - Move the 'Format' cl::opt to make it easier to extend. - Just create one function view file, instead of overwriting the same file for every new function. Add a regression test for this. llvm-svn: 274086
-
Philip Reames authored
llvm-svn: 274083
-
Philip Reames authored
llvm-svn: 274082
-
Philip Reames authored
llvm-svn: 274081
-
Kevin Enderby authored
and its clients to use the new llvm::Error model for error handling. Changed getAsArchive() from ErrorOr<...> to Expected<...> so now all interfaces there use the new llvm::Error model for return values. In the two places it had if (!Parent) this is actually a program error so changed from returning errorCodeToError(object_error::parse_failed) to calling report_fatal_error() with a message. In getObjectForArch() added error messages to its two llvm::Error return values instead of returning errorCodeToError(object_error::arch_not_found) with no error message. For the llvm-obdump, llvm-nm and llvm-size clients since the only binary files in Mach-O Universal Binaries that are supported are Mach-O files or archives with Mach-O objects, updated their logic to generate an error when a slice contains something like an ELF binary instead of ignoring it. And added a test case for that. The last error stuff to be cleaned up for libObject’s MachOUniversalBinary is the use of errorOrToExpected(Archive::create(ObjBuffer)) which needs Archive::create() to be changed from ErrorOr<...> to Expected<...> first, which I’ll work on next. llvm-svn: 274079
-
- Jun 28, 2016
-
-
Simon Pilgrim authored
llvm-svn: 274065
-
Vedant Kumar authored
This index lists the reports available in the 'coverage' sub-directory. This will help navigate coverage output from large projects. This commit factors the file creation code out of SourceCoverageView and into CoveragePrinter. llvm-svn: 274029
-
Vedant Kumar authored
- Test the '-o' alias for -output-dir. - Use a helper method in a conditional. - Add a period. llvm-svn: 274028
-
Vedant Kumar authored
llvm-svn: 274027
-
Vedant Kumar authored
This makes it a bit more generic, in case we want to emit summary reports in different formats in the future. llvm-svn: 274026
-
Vedant Kumar authored
llvm-svn: 274025
-
Simon Pilgrim authored
llvm-svn: 274011
-
Vedant Kumar authored
llvm-svn: 273988
-
Vedant Kumar authored
Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if it doesn't already exist, and prints reports into that directory. In function view mode, all views are written into path/to/dir/functions.$EXTENSION. In file view mode, all views are written into path/to/dir/coverage/$PATH.$EXTENSION. Changes since the initial commit: - Avoid accidentally closing stdout twice. llvm-svn: 273985
-
Vedant Kumar authored
This reverts commit r273971. test/profile/instrprof-visibility.cpp is failing because of an uncaught error in SafelyCloseFileDescriptor. llvm-svn: 273978
-
Vedant Kumar authored
Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if it doesn't already exist, and prints reports into that directory. In function view mode, all views are written into path/to/dir/functions.$EXTENSION. In file view mode, all views are written into path/to/dir/coverage/$PATH.$EXTENSION. llvm-svn: 273971
-
Vedant Kumar authored
llvm-svn: 273969
-
Vedant Kumar authored
llvm-svn: 273968
-
- Jun 27, 2016
-
-
Kevin Enderby authored
allow a good error message to be produced. I added the one test case that the object file tools could produce an error message. The other two errors can’t be triggered if the input file is passed through sys::fs::identify_magic(). But the malformedError("bad magic number") does get triggered by the logic in llvm-dsymutil when dealing with a normal Mach-O file. The other "File too small ..." error would take a logic error currently to produce and is not tested for. llvm-svn: 273946
-
Davide Italiano authored
binutils ar uses -plugin to specify the LTO plugin, but LLVM doesn't need this as it doesn't use a plugin for LTO. Accepting (and ignoring) the option allows interoperability with existing build systems and make downstream consumers life much easier. No objections from Rafael on this change. llvm-svn: 273938
-
Chris Bieneman authored
Summary: Our YAML library's handling of tags isn't perfect, but it is good enough to get rid of the need for the --format argument to yaml2obj. This patch does exactly that. Instead of requiring --format, it infers the format based on the tags found in the object file. The supported tags are: !ELF !COFF !mach-o !fat-mach-o I have a corresponding patch that is quite large that fixes up all the in-tree test cases. Reviewers: rafael, Bigcheese, compnerd, silvas Subscribers: compnerd, llvm-commits Differential Revision: http://reviews.llvm.org/D21711 llvm-svn: 273915
-
- Jun 26, 2016
-
-
David Majnemer authored
The last import is the penultimate entry, the last entry is nulled out. Data beyond the null entry should not be considered to hold import entries. This fixes PR28302. N.B. I am working on a reduced testcase, the one in PR28302 is too large. llvm-svn: 273790
-
Vedant Kumar authored
If a sub-view has already been rendered, it's helpful to re-render the expansion site before rendering the next expansion view. Make this fact explicit in the rendering interface, instead of hiding it behind an awkward Optional<LineRef> parameter. llvm-svn: 273789
-
- Jun 25, 2016
-
-
Vedant Kumar authored
Make renderExpansionView() look a bit more like renderLine(), and clarify its doxygen comment. llvm-svn: 273773
-
Vedant Kumar authored
llvm-svn: 273772
-
Vedant Kumar authored
There's some kind of issue with using "constexpr unsigned" in an anonymous namespace. http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/13395 llvm-svn: 273770
-
Vedant Kumar authored
This makes it easier to add renderers for new kinds of output formats. - Define and document a pure-virtual coverage rendering interface. - Move the text-based rendering logic into its a new file. - Re-work the API to better reflect the presentation/formatting split. llvm-svn: 273767
-
- Jun 24, 2016
-
-
Chris Bieneman authored
This patch adds round-trip support for MachO Universal binaries to obj2yaml and yaml2obj. Universal binaries have a header and list of architecture structures, followed by a the individual object files at specified offsets. llvm-svn: 273719
-
Michael Kuperstein authored
llvm-svn: 273713
-
Kevin Enderby authored
a good error message to be produced. This is nearly the last libObject interface that used ErrorOr and the last one that appears in llvm/include/llvm/Object/MachO.h . For Mach-O objects this is just a clean up because it’s version of getSymbolAddress() can’t return an error. I will leave it to the experts on COFF and ELF to actually add meaning full error messages in their tests if they wish. And also leave it to these experts to change the last two ErrorOr interfaces in llvm/include/llvm/Object/ObjectFile.h for createCOFFObjectFile() and createELFObjectFile() if they wish. Since there are no test cases for COFF and ELF error cases with respect to getSymbolAddress() in the test suite this is no functional change (NFC). llvm-svn: 273701
-
Vedant Kumar authored
They were using output streams inconsistently. One also had a grammar bug. I noticed these while trying to pare down D18278. llvm-svn: 273642
-
Vedant Kumar authored
A lot of this code is going to move into the text-based coverage renderer, and won't be able to use Options directly. Use the getter. llvm-svn: 273635
-
Vedant Kumar authored
A SourceName can be a file or a function. It makes sense to attach this information to a SourceCoverageView, seeing as views (1) already point to the text corresponding to the relevant source code and (2) are already used to render that text along with the SourceNames. This is a nice cleanup which is independent of the upcoming html patch. While we're at it, document the fields in SourceCoverageView. llvm-svn: 273634
-
Vedant Kumar authored
Pull LineCoverageInfo out of SourceCoverageView and rename it so that it doesn't conflict with another class of the same name in CoverageSummaryInfo.h. This cuts down on the amount of code we have to move into a `protected` section of SourceCoverageView for the upcoming html patch. It also makes the code a bit clearer: having two LineCoverageInfo's is strange. llvm-svn: 273633
-