Devang Patel
e5a8f2f9f3
Simplify.
...
llvm-svn: 140789
2011-09-29 17:06:40 +00:00
Devang Patel
eec5c5bf6e
Clarify comments.
...
llvm-svn: 140787
2011-09-29 16:52:53 +00:00
Devang Patel
1e6ee351fc
Remove unnecessary and unused data member.
...
llvm-svn: 140786
2011-09-29 16:48:44 +00:00
Devang Patel
a9e8a2504c
Cosmetic changes, as per Nick's review.
...
llvm-svn: 140785
2011-09-29 16:46:47 +00:00
Andrew Trick
7dc278dc52
Fix build failures better.
...
llvm-svn: 140758
2011-09-29 01:22:31 +00:00
Daniel Dunbar
9a6fa7cf3d
Fix build failure.
...
llvm-svn: 140755
2011-09-29 01:14:42 +00:00
Michael J. Spencer
cc5f8d4517
llvm-size: Apply Chris's code review fixes.
...
This doesn't use formated_raw_ostream because it doesn't support the
functionality needed.
llvm-svn: 140751
2011-09-29 00:59:18 +00:00
Michael J. Spencer
7f168777e5
Fix cast.
...
llvm-svn: 140726
2011-09-28 21:24:44 +00:00
Michael J. Spencer
c4ad46605e
Add llvm-size.
...
llvm-svn: 140722
2011-09-28 20:57:46 +00:00
Devang Patel
3714065a94
Introduce llvm-cov.
...
Add llvm-cov skeleton. It has initial support to read coverage info generated by GCOVProfiling.cpp.
Today, you can do
prompt> clang a.c -ftest-coverage -fprofile-arcs -o a
prompt> ./a
prompt> llvm-cov -gcno a.gcno -gcda a.gcda
a.c
: #include "a.h"
:
: int main() {
: int i = 0;
: if (i) {
1: int j = 0;
1: j = 1;
1: } else {
: int k = 1;
: k = 2;
: }
1: return 0;
: }
:
:
llvm-svn: 140712
2011-09-28 18:50:00 +00:00
Michael J. Spencer
2bc774ac1a
Add binary archive support to llvm-nm.
...
llvm-svn: 140627
2011-09-27 19:37:18 +00:00
Benjamin Kramer
8a529dc10a
llvm-objdump: Detach symbol listing from section enumeration for mach-o.
...
This reduces memory usage as we don't add the same symbol multiple times anymore.
llvm-svn: 140278
2011-09-21 22:16:43 +00:00
Benjamin Kramer
37a7151b1f
llvm-objdump: Take the data from the right object when there's no dSYM around.
...
llvm-svn: 140269
2011-09-21 18:18:53 +00:00
Benjamin Kramer
9eaefa9786
llvm-objdump: Fix use after free.
...
llvm-svn: 140237
2011-09-21 04:01:19 +00:00
Benjamin Kramer
699128e58a
llvm-objdump: Output line info next to the disassembly if available.
...
MachO-only at the moment, sorry.
Usage:
$ llvm-objdump -d -m -g -dsym=a.out.dSYM/Contents/Resources/DWARF/a.out a.out
_main:
100000e90: 55 pushq %rbp ## test.c:11:3
…
llvm-svn: 140224
2011-09-21 01:13:19 +00:00
Benjamin Kramer
2ad2eb527b
llvm-objdump: factor code better, add comments.
...
llvm-svn: 140153
2011-09-20 17:53:01 +00:00
Eric Christopher
a8ce0324e9
Remove llvmc from CMake as well.
...
llvm-svn: 140109
2011-09-20 00:13:13 +00:00
Eric Christopher
4b0ae48614
Remove llvmc and assorted build machinery for it.
...
The problems that llvmc solved have largely been subsumed with the
tasks that the clang driver can accomplish, but llvmc lacks flexibility
and depends too heavily on the EOL'd llvm-gcc.
llvm-svn: 140093
2011-09-19 23:22:41 +00:00
Benjamin Kramer
444f079d34
Nope, there's another one!
...
llvm-svn: 140045
2011-09-19 20:23:01 +00:00
Benjamin Kramer
babc5291f4
Missed one instance of implicit pointer conversion.
...
llvm-svn: 140044
2011-09-19 20:14:46 +00:00
Benjamin Kramer
78ee973788
Try to make MSVC 2010 happy.
...
llvm-svn: 140042
2011-09-19 20:08:52 +00:00
Benjamin Kramer
43a772eda1
Add a MachO-specific "mode" to llvm-objdump, that, if enabled, gathers additional information that are only available on MachO.
...
- It can take FunctionStarts from a binary to find entry points more accurately.
- Symbol offsets in executables are correct now.
llvm-svn: 140028
2011-09-19 17:56:04 +00:00
Chad Rosier
f0d3786945
Add -rfunc and -rglob options to llvm-extract to support regular
...
expression matching.
llvm-svn: 139945
2011-09-16 21:09:17 +00:00
Owen Anderson
a0c3b97221
Don't attach annotations to MCInst's. Instead, have the disassembler return, and the printer accept, an annotation string which can be passed through if the client cares about annotations.
...
llvm-svn: 139876
2011-09-15 23:38:46 +00:00
Ivan Krasin
639222d090
use 64-bit types instead of off_t/size_t to avoid the issue when
...
gold plugin is built with Large File Support (sizeof(off_t) == 64 on i686)
and the rest of LLVM is built w/o Large File Support
(sizeof(off_t) == 32 on i686) which corrupts the stack.
llvm-svn: 139873
2011-09-15 23:13:00 +00:00
Benjamin Kramer
4d9924f950
llvm-dwarfdump: Add an option to print out line info for a specific address
...
Usage:
$ llvm-dwarfdump -address=0x0000000100000ed4 a.out.dSYM/Contents/Resources/DWARF/a.out
xxx.c:6:0
llvm-svn: 139850
2011-09-15 21:17:40 +00:00
Benjamin Kramer
07d4b1c455
DWARF: wire up .debug_str dumping.
...
llvm-svn: 139799
2011-09-15 16:57:13 +00:00
Benjamin Kramer
5acab501de
DWARF: Add basic support for line tables.
...
The llvm-dwarfdump output isn't very verbose yet.
llvm-svn: 139771
2011-09-15 02:12:05 +00:00
Benjamin Kramer
973b5cde7e
llvm-dwarfdump: Make the "is debug info section" heuristic stricter so it doesn't accidentaly picks up the wrong section.
...
Also add some validation code to the aranges section parser.
Fixes PR10926.
llvm-svn: 139701
2011-09-14 17:28:13 +00:00
Benjamin Kramer
75d1cf3391
Object: make the following changes into SymbolRef
...
- Add enum SymbolType and function getSymbolType()
- Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions.
- Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address.
- Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump.
Patch by Danil Malyshev!
llvm-svn: 139683
2011-09-14 01:22:52 +00:00
Benjamin Kramer
a6002fd920
DWARF: Port support for parsing .debug_aranges section from LLDB and wire it up to llvm-dwarfdump.
...
This is only one half of it, the part that caches address ranges from the DIEs when .debug_aranges is
not available will be ported soon.
llvm-svn: 139680
2011-09-14 01:09:52 +00:00
Benjamin Kramer
aa2f78f5e6
Sketch out a DWARF parser.
...
This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.
It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.
llvm-svn: 139627
2011-09-13 19:42:23 +00:00
Ivan Krasin
5021af51d9
gold plugin: don't report error on non-bitcode (e.g. ELF) files.
...
llvm-svn: 139544
2011-09-12 21:47:50 +00:00
Ivan Krasin
d5f2d8c341
gold plugin: report errors occured in lto_module_create_from_*
...
llvm-svn: 139340
2011-09-09 00:14:04 +00:00
Ivan Krasin
cc2a801f64
lto/addAsmGlobalSymbols: fast path when no module level asm is present.
...
llvm-svn: 139284
2011-09-08 07:38:25 +00:00
Ivan Krasin
8149dd6619
lto/addAsmGlobalSymbols: fail fracefully when the target does not define AsmParser.
...
llvm-svn: 139283
2011-09-08 07:36:39 +00:00
James Molloy
4c493e8050
Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= handling to llvm-mc. Reviewed by Owen Anderson.
...
llvm-svn: 139237
2011-09-07 17:24:38 +00:00
Chandler Carruth
908abc3439
As a (rather delayed) followup to r136738 which stopped building the
...
edis shared library in the Makefile build, also stop building it in the
CMake build.
Patch by arrowdodger!
llvm-svn: 139108
2011-09-04 23:32:05 +00:00
Benjamin Kramer
6397051ece
Don't drop alignment info on local common symbols.
...
- On COFF the .lcomm directive has an alignment argument.
- On ELF we fall back to .local + .comm
Based on a patch by NAKAMURA Takumi.
Fixes PR9337, PR9483 and PR10128.
llvm-svn: 138976
2011-09-01 23:04:27 +00:00
Benjamin Kramer
58298f028c
Teach macho-dump to dump the uleb128s referred to by linkedit_data segments.
...
llvm-svn: 138836
2011-08-30 22:10:58 +00:00
Benjamin Kramer
267a6d92fa
Teach macho-dump how to dump linkedit_data load commands.
...
llvm-svn: 138807
2011-08-30 18:33:37 +00:00
Evan Cheng
2bb4035707
Move TargetRegistry and TargetSelect from Target to Support where they belong.
...
These are strictly utilities for registering targets and components.
llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Evan Cheng
4d6c9d711d
Some refactoring so TargetRegistry.h no longer has to include any files
...
from MC.
llvm-svn: 138367
2011-08-23 20:15:21 +00:00
John Criswell
bae1c0b23b
Fixed compilation warning on Linux by fixing the type of a return value.
...
llvm-svn: 137913
2011-08-18 01:19:05 +00:00
Owen Anderson
a4043c4b32
Allow the MCDisassembler to return a "soft fail" status code, indicating an instruction that is disassemblable, but invalid. Only used for ARM UNPREDICTABLE instructions at the moment.
...
Patch by James Molloy.
llvm-svn: 137830
2011-08-17 17:44:15 +00:00
Jim Grosbach
345768c9ff
Remove unused Target argument from AsmParser construction methods.
...
The argument is unused, and is a layering violation in any case.
llvm-svn: 137735
2011-08-16 18:33:49 +00:00
Nick Lewycky
45fc2a6a9b
Fix bugpoint fallout from the new type system.
...
llvm-svn: 137467
2011-08-12 17:25:45 +00:00
Duncan Sands
a41634e307
Silence a bunch (but not all) "variable written but not read" warnings
...
when building with assertions disabled.
llvm-svn: 137460
2011-08-12 14:54:45 +00:00
Benjamin Kramer
c22d50e5c3
Add MCInstrAnalysis class. This allows the targets to specify own versions of MCInstrDescs functions.
...
- Add overrides for ARM.
- Teach llvm-objdump to use this instead of plain MCInstrDesc.
llvm-svn: 137059
2011-08-08 18:56:44 +00:00
Benjamin Kramer
4c0423bc8f
llvm-objdump: disassembly enhancements
...
- Indent simple loops
- Print unreachable blocks as .byte directives
llvm-svn: 137058
2011-08-08 18:41:34 +00:00