Chris Lattner
03be469732
remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible back to 3.0
...
llvm-svn: 145164
2011-11-27 05:48:27 +00:00
Rafael Espindola
17a991f91c
Point to libLTO with -L/PATH/ -lLTO so that it is found in the install
...
directory.
Patch by Markus Trippelsdorf.
llvm-svn: 145095
2011-11-23 03:07:25 +00:00
Evan Cheng
2b239cbcf6
Sink codegen optimization level into MCCodeGenInfo along side relocation model
...
and code model. This eliminates the need to pass OptLevel flag all over the
place and makes it possible for any codegen pass to use this information.
llvm-svn: 144788
2011-11-16 08:38:26 +00:00
Michael J. Spencer
70bc3d6855
llvm-objdump: Ignore non-objects in archives.
...
llvm-svn: 144755
2011-11-16 01:24:41 +00:00
Benjamin Kramer
a2f57dee6d
Remove all remaining uses of Value::getNameStr().
...
llvm-svn: 144648
2011-11-15 16:27:03 +00:00
Daniel Dunbar
f7435b501a
llvm-config-2: Detect when we are running out of a BuildTools development tree, so that we can always provide library/include information for the real build directory.
...
llvm-svn: 144420
2011-11-11 22:59:47 +00:00
Daniel Dunbar
efa02a0c3d
LLVMBuild: Add description files for the LLVM tools.
...
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Benjamin Kramer
a52be4ff03
Clients are responsible for initializing the targets, remove it from the disassembler API.
...
This will break users of the LLVMCreateDisasm API (not that I know of any). They have to call the
LLVMInitializeAll* functions from llvm-c/Target.h themselves now. edis' C API in all its horribleness
should be unaffected.
llvm-svn: 144385
2011-11-11 13:20:40 +00:00
Daniel Dunbar
745409c62f
Revert r144300 "llvm-config: Replace with C++ version (was llvm-config-2).",
...
which didn't appear ready for prime time.
llvm-svn: 144309
2011-11-10 19:59:35 +00:00
Daniel Dunbar
e9f2479115
llvm-config: Replace with C++ version (was llvm-config-2).
...
llvm-svn: 144300
2011-11-10 18:49:59 +00:00
Daniel Dunbar
61ee56243c
llvm-config-2: Use USEDLIBS directly instead of LINK_COMPONENTS, which will
...
require this tool to resolve (currently).
llvm-svn: 144299
2011-11-10 18:49:50 +00:00
Daniel Dunbar
45b3cafb6a
llvm-config-2: Fix thinko in maintenance of visited component set.
...
llvm-svn: 144291
2011-11-10 14:53:23 +00:00
Daniel Dunbar
c2034ff5ce
llvm-config: Drop 'backend' pseudo-component. We don't support/qualify the CBE
...
enough to have this be useful.
llvm-svn: 144202
2011-11-09 19:23:15 +00:00
Daniel Dunbar
9992ca1c90
llvm-config-2: Switch to using real library dependency table.
...
- Also, fix a refacto that left extra "all" component in list (this is now
defined in the groups explicitly)
- Reapply of r143879 now that Make should see needed deps.
llvm-svn: 144201
2011-11-09 19:14:51 +00:00
John McCall
2eda1daed3
Use isa<> instead of dyn_cast<> as suggested by Nick.
...
Should've read the patch a bit closer, sorry.
llvm-svn: 144164
2011-11-09 03:26:50 +00:00
John McCall
0accc78829
Fix the printing of constants. Patch by Stepan Dyatkovskiy!
...
llvm-svn: 144079
2011-11-08 06:53:04 +00:00
Owen Anderson
c6f0814beb
Fix llvm-objdump's MachO mode to not depend on the value returned by RelocationRef::getInfo().
...
llvm-svn: 143966
2011-11-07 17:21:36 +00:00
Daniel Dunbar
aa157a13fe
Revert "llvm-config-2: Switch to using real library dependency table." while I
...
investigate build failure.
llvm-svn: 143888
2011-11-06 19:57:04 +00:00
Daniel Dunbar
26b6fe7292
llvm-config: Users are allowed to provide component names in mixed case.
...
llvm-svn: 143881
2011-11-06 18:04:49 +00:00
Daniel Dunbar
e3dc39c01b
llvm-config-2: Switch to using real library dependency table.
...
- Also, fix a refacto that left extra "all" component in list (this is now
defined in the groups explicitly)
llvm-svn: 143879
2011-11-06 18:04:23 +00:00
Benjamin Kramer
3c2ba1a51a
Add more PRI.64 macros for MSVC and use them throughout the codebase.
...
llvm-svn: 143799
2011-11-05 08:57:40 +00:00
Peter Collingbourne
42ebc937cb
Now that the linker supports lazily materialising globals, don't
...
materialise them in LTO.
I observed a ~0.5-1% speedup for an LTO link of opt.
llvm-svn: 143784
2011-11-05 04:17:25 +00:00
Peter Collingbourne
470083dc27
Use absolute path to exportsfile in gold plugin CMake build.
...
(Ninja generator requirement.)
llvm-svn: 143783
2011-11-05 04:17:20 +00:00
Bill Wendling
83f7f41d72
Reformatting changes to get rid of blank lines, put code on one line, and to
...
decrease some code indentation. No intended functional changes.
llvm-svn: 143723
2011-11-04 18:48:00 +00:00
Bill Wendling
510b538e32
Move comment to the correct place.
...
llvm-svn: 143690
2011-11-04 09:34:06 +00:00
Bill Wendling
c339c04e2e
Make the Mangler an ivar so that it doesn't have to be passed around everywhere.
...
llvm-svn: 143689
2011-11-04 09:30:19 +00:00
Bill Wendling
2d3ef29584
Refactor the MCContext so that it's an ivar instead of a local which is passed
...
around. This is important for some future work as well.
llvm-svn: 143688
2011-11-04 09:24:40 +00:00
Daniel Dunbar
6ed1f79da0
llvm-config-2: Implement build system support for getting the variables we only
...
know at build time.
llvm-svn: 143649
2011-11-03 21:01:36 +00:00
Daniel Dunbar
3760ebeebb
build: Add initial cut at LLVMBuild.txt files.
...
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Daniel Dunbar
c679323639
llvm-config-2: Implement component dependency traversal, implement support for 'all', and fix a few other minor bugs.
...
- Still doesn't use actual generated component table, but that is now just a matter of wiring into the build system.
llvm-svn: 143617
2011-11-03 17:30:19 +00:00
Daniel Dunbar
cce5afb483
llvm-config: Start stubbing out a C++ version of llvm-config (as llvm-config-2,
...
for now).
- Mostly complete except for the data that needs to come from the build system
or the dependencies.
- Has some small improvements from current llvm-config:
o Uses TargetRegistry directly to get some information.
o Designed to work correctly when used from a CMake build tree (relatively
untested currently) (although pcc fixed this recently for old llvm-config).
llvm-svn: 143616
2011-11-03 17:30:16 +00:00
Chad Rosier
1caee0fa23
Remove some cruft from the BitcodeWriter, while still maintaining backward
...
compatibility in the BitcodeReader.
llvm-svn: 143598
2011-11-03 00:14:01 +00:00
Chandler Carruth
8180de55b4
Add back the top-level target for 'llvm-config' and the dependency edge
...
to force it to build after all library targets so it has complete
dependency information. This should fix broken 'make install' with
CMake.
This is a partial revert of r143540, but it doesn't revert the most
important part of that change: removing the dependency edge from LLVM
tools to the llvm-config script.
llvm-svn: 143548
2011-11-02 17:22:57 +00:00
Daniel Dunbar
51a1dcaa27
build/Make: Get rid of llvm-config-perobj, which isn't used anymore.
...
llvm-svn: 143541
2011-11-02 15:56:52 +00:00
Daniel Dunbar
dbae312357
build/CMake: Remove llvm-config.target used to serialize tool builds on
...
llvm-config build, there is no longer a point to this after Chandler's work.
llvm-svn: 143540
2011-11-02 15:56:38 +00:00
Kevin Enderby
64fe093030
First part of support for generating dwarf for assembly source files with the
...
-g flag. In this part we generate the .file for the source being assembled and
the .loc's for the assembled instructions.
The next part will be to generate the dwarf Compile Unit DIE and a dwarf
subprogram DIE for each non-temporary label.
Once the next part is done test cases will be added. rdar://9275556
llvm-svn: 143509
2011-11-01 22:27:22 +00:00
Sebastian Pop
f72a853709
rename getHostTriple into getDefaultTargetTriple
...
llvm-svn: 143502
2011-11-01 21:32:20 +00:00
Eli Friedman
038abbd863
A couple misc fixes so that bugpoint doesn't explode reducing code containing landingpads.
...
llvm-svn: 143435
2011-11-01 04:40:56 +00:00
Nick Lewycky
7308946be2
Switch new .file directive emission off by default, change llc's flag for it to
...
-enable-dwarf-directory.
llvm-svn: 143326
2011-10-31 01:06:02 +00:00
Stepan Dyatkovskiy
d1216f47ca
uint64 formatted output: replaced %llx with PRIx64 macro.
...
llvm-svn: 143191
2011-10-28 13:07:32 +00:00
Peter Collingbourne
91824cb6ac
Have llvm-config --cppflags print correct flags when in CMake build directory
...
Previously, if invoked from a CMake build directory, 'llvm-config
--cppflags' and friends would only print a -I flag for the build
directory's header search path, because it would assume that it was
already installed, not recognising its parent directory as being the
build directory. Teach llvm-config about CMake build directories
so that it prints a -I for both the source and build directory's
search paths.
llvm-svn: 143171
2011-10-28 01:02:16 +00:00
Dan Gohman
892b86e74c
Remove the Alpha backend.
...
llvm-svn: 143164
2011-10-27 22:56:32 +00:00
Owen Anderson
c14e970962
Revert r143149, stubbing out symbolic disassembly support. The symbolic disassembly support is too MC-engrained to be useful in llvm-objdump.
...
llvm-svn: 143152
2011-10-27 21:55:13 +00:00
Owen Anderson
52982d93c4
Stub out support for symbol disassembly in llvm-objdump.
...
llvm-svn: 143149
2011-10-27 21:46:31 +00:00
Stepan Dyatkovskiy
7942165053
Fixed llvm-objdump uint64_t formatted output.
...
llvm-svn: 143120
2011-10-27 18:40:45 +00:00
Owen Anderson
7a9bb4d47f
Expand relocation type field to 64 bits. MachO scattered relocations require 33 bits of type info.
...
llvm-svn: 143032
2011-10-26 17:08:49 +00:00
Michael J. Spencer
2ec1e8e92f
llvm-nm: Use correct format string. Patch by Stepan Dyatkovskiy!
...
llvm-svn: 142984
2011-10-25 22:45:47 +00:00
Owen Anderson
69d98376b9
Add support for the notion of "hidden" relocations. On MachO, these are relocation entries that are used as additional information for other, real relocations, rather than being relocations themselves.
...
I'm not familiar enough with ELF or COFF to know if they should have any relocations marked hidden.
llvm-svn: 142961
2011-10-25 20:35:53 +00:00
Owen Anderson
df9058b98c
Fix off-by-one error when printing relocations inline with disassembly.
...
llvm-svn: 142952
2011-10-25 20:15:39 +00:00
Michael J. Spencer
f21a701890
llvm-objdump: Add static symbol table dumping.
...
llvm-svn: 142404
2011-10-18 19:32:17 +00:00
Daniel Dunbar
81780d9982
build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
...
new all-targets pseudo-component.
llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Daniel Dunbar
2299fff72b
llvm-ar: Remove local test target, this is no longer useful.
...
llvm-svn: 142400
2011-10-18 19:27:10 +00:00
Daniel Dunbar
ff8a3694fe
llvm-config: Add an all-targets pseudo-component.
...
llvm-svn: 142399
2011-10-18 19:27:08 +00:00
Michael J. Spencer
00c39291ef
Revert "llvm-objdump: Add static symbol table dumping."
...
This reverts commit 0c30d4e4f5f9110c5a67bd0ca84444dc58697596.
llvm-svn: 142320
2011-10-18 00:17:04 +00:00
Michael J. Spencer
8c590fd08d
llvm-objdump: Add static symbol table dumping.
...
llvm-svn: 142319
2011-10-17 23:55:22 +00:00
Nick Lewycky
c551c1c5f9
Add support for a new extension to the .file directive:
...
.file filenumber "directory" "filename"
This removes one join+split of the directory+filename in MC internals. Because
bitcode files have independent fields for directory and filenames in debug info,
this patch may change the .o files written by existing .bc files.
llvm-svn: 142300
2011-10-17 23:05:28 +00:00
Owen Anderson
e607004d1b
Rewrite most of MachODump to work through the generic libObject interfaces rather than accessing the MachO internals directly.
...
llvm-svn: 142263
2011-10-17 21:37:35 +00:00
Michael J. Spencer
277eaf9f19
llvm-objdump: Add -s, which prints the contents of each section.
...
llvm-svn: 142199
2011-10-17 17:13:22 +00:00
NAKAMURA Takumi
782601653d
tools/CMakeLists.txt: Fixup r142103. I don't remember why I had missed the line.
...
llvm-svn: 142136
2011-10-16 11:50:37 +00:00
Chris Lattner
391d90c9a6
Make SMDiagnostic a little more sane. Instead of passing around note/warning/error as a
...
string, pass it around as an enum.
llvm-svn: 142107
2011-10-16 05:43:57 +00:00
Chris Lattner
321335142c
Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
...
the X86 asmparser to produce ranges in the one case that was annoying me, for example:
test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~
It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.
llvm-svn: 142106
2011-10-16 04:47:35 +00:00
NAKAMURA Takumi
9ef901972f
CMake: Introduce LLVM_CLANG_SOURCE_DIR, "tools/clang" by default. Clang will not be built if LLVM_CLANG_SOURCE_DIR="" or ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt is not found.
...
llvm-svn: 142103
2011-10-16 02:54:33 +00:00
NAKAMURA Takumi
3e8c737ac8
autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang on tools/Makefile.
...
llvm-svn: 142102
2011-10-16 02:54:26 +00:00
Michael J. Spencer
4ee36e15ad
llvm-object: Add inline relocation information to disassembly.
...
llvm-svn: 141897
2011-10-13 22:17:18 +00:00
Michael J. Spencer
309e0cb513
llvm-objdump: Fix whitespace.
...
llvm-svn: 141886
2011-10-13 20:37:20 +00:00
Michael J. Spencer
fa3f63c14a
llvm-objdump: Fix dumping of multiple symbols with the same address.
...
This happens in COFF because there is a symbol for the beginning of each
section.
llvm-svn: 141885
2011-10-13 20:37:08 +00:00
NAKAMURA Takumi
bf2fb9b9e2
llvm-objdump.cpp: Use PRIx64 as format specifier for int64_t.
...
llvm-svn: 141664
2011-10-11 12:51:50 +00:00
Tanya Lattner
0ae574fe2b
Make it possible to use the linker without destroying the source module. This is so the source module can be linked to multiple other destination modules. For all that used LinkModules() before, they will continue to destroy the source module as before.
...
This line, and those below, will be ignored--
M include/llvm/Linker.h
M tools/bugpoint/Miscompilation.cpp
M tools/bugpoint/BugDriver.cpp
M tools/llvm-link/llvm-link.cpp
M lib/Linker/LinkModules.cpp
llvm-svn: 141606
2011-10-11 00:24:54 +00:00
Nick Lewycky
73e4d372d0
Add support for dumping section headers to llvm-objdump. This uses the same
...
flags as binutils objdump but the output is different, not just in format but
also showing different sections. Compare its results against readelf, not
objdump.
llvm-svn: 141579
2011-10-10 21:21:34 +00:00
Benjamin Kramer
05836b12fd
llvm-objdump: Take ownership of MCInstrInfos.
...
llvm-svn: 141535
2011-10-10 13:10:09 +00:00
Benjamin Kramer
357893ba6f
llvm-nm: Don't leak bitcode buffers.
...
llvm-svn: 141534
2011-10-10 13:10:04 +00:00
Michael J. Spencer
e497728e76
llvm-objdump: Add relocation and archive support.
...
llvm-svn: 141451
2011-10-08 00:18:30 +00:00
Michael J. Spencer
7037dc0b45
Fix a few changes I missed.
...
llvm-svn: 141392
2011-10-07 19:52:41 +00:00
Michael J. Spencer
3cc26e4c5e
Fix GCC again.
...
llvm-svn: 141389
2011-10-07 19:46:12 +00:00
Michael J. Spencer
022d2639d9
Fix spelling in comment.
...
llvm-svn: 141386
2011-10-07 19:25:47 +00:00
Michael J. Spencer
34d76cf95b
Change relocation API to be per section. This time without breaking GCC.
...
llvm-svn: 141385
2011-10-07 19:25:32 +00:00
Bill Wendling
ecbddb2b9e
Revert 141376 and 141377 due to breaking the build.
...
--- Reverse-merging r141377 into '.':
U tools/llvm-objdump/MachODump.cpp
--- Reverse-merging r141376 into '.':
U include/llvm/Object/COFF.h
U include/llvm/Object/ObjectFile.h
U include/llvm-c/Object.h
U tools/llvm-objdump/llvm-objdump.cpp
U lib/Object/MachOObjectFile.cpp
U lib/Object/COFFObjectFile.cpp
U lib/Object/Object.cpp
U lib/Object/ELFObjectFile.cpp
llvm-svn: 141379
2011-10-07 18:25:37 +00:00
Michael J. Spencer
8c104f4259
Fix spelling in comment.
...
llvm-svn: 141377
2011-10-07 18:15:40 +00:00
Michael J. Spencer
14925a859b
Change relocation API to be per section.
...
llvm-svn: 141376
2011-10-07 18:15:25 +00:00
Devang Patel
196ef2ac28
Update cmake list.
...
llvm-svn: 141104
2011-10-04 19:38:16 +00:00
Devang Patel
90c78f84f2
Put GCOVFile and other related interface in a common header so that llvm-cov tool can share it with GCOV writer.
...
llvm-svn: 141095
2011-10-04 17:24:48 +00:00
Peter Collingbourne
82881bd04b
Exclude libLLVMTableGen.a from the shared library
...
Unbreaks tools for --enable-shared build.
llvm-svn: 141052
2011-10-04 00:30:34 +00:00
Devang Patel
e5a1e5b655
Simplify.
...
llvm-svn: 140789
2011-09-29 17:06:40 +00:00
Devang Patel
b1bef6ba30
Clarify comments.
...
llvm-svn: 140787
2011-09-29 16:52:53 +00:00
Devang Patel
0729c18444
Remove unnecessary and unused data member.
...
llvm-svn: 140786
2011-09-29 16:48:44 +00:00
Devang Patel
204df6030c
Cosmetic changes, as per Nick's review.
...
llvm-svn: 140785
2011-09-29 16:46:47 +00:00
Andrew Trick
3f3416249a
Fix build failures better.
...
llvm-svn: 140758
2011-09-29 01:22:31 +00:00
Daniel Dunbar
8b3e105420
Fix build failure.
...
llvm-svn: 140755
2011-09-29 01:14:42 +00:00
Michael J. Spencer
3b747b0b5d
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
4dc1ab6c03
Fix cast.
...
llvm-svn: 140726
2011-09-28 21:24:44 +00:00
Michael J. Spencer
3e283fe7d4
Add llvm-size.
...
llvm-svn: 140722
2011-09-28 20:57:46 +00:00
Devang Patel
3605f8423f
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
89e83b38cd
Add binary archive support to llvm-nm.
...
llvm-svn: 140627
2011-09-27 19:37:18 +00:00
Benjamin Kramer
e106715386
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
abc83415a1
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
e55a93f3a1
llvm-objdump: Fix use after free.
...
llvm-svn: 140237
2011-09-21 04:01:19 +00:00
Benjamin Kramer
703be6434e
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
c4ca0b476f
llvm-objdump: factor code better, add comments.
...
llvm-svn: 140153
2011-09-20 17:53:01 +00:00
Eric Christopher
e34ce0c720
Remove llvmc from CMake as well.
...
llvm-svn: 140109
2011-09-20 00:13:13 +00:00
Eric Christopher
92ffa08e9a
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