Sean Silva
873dafebc7
[yaml2obj][ELF] Add support for st_value and st_size.
...
After this patch, the ELF file produced by
`yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64
(under SysV ABI, obviously; I tested on Linux), produces a working
executable that goes into an infinite loop!
llvm-svn: 184469
2013-06-20 20:59:47 +00:00
Sean Silva
b8315826cf
[yaml2obj][ELF] Allow symbols to reference sections.
...
llvm-svn: 184468
2013-06-20 20:59:41 +00:00
Sean Silva
b36f148890
[yaml2obj][ELF] Add the section name -> section index map to State.
...
One of the key things that the YAML format abstracts over is the use of
section numbers for referencing sections. Instead, textual section names
are used, which yaml2obj then translates into appropriate section
numbers. (Technically ELF doesn't care about section names (only section
numbers), but since this is a testing tool, readability counts).
This simplifies using section names as symbolic references in various
parts of the code. An upcoming commit will use this to allow symbols to
reference sections.
llvm-svn: 184467
2013-06-20 20:59:34 +00:00
Rafael Espindola
695308b067
Add a setLastModificationAndAccessTime to PathV2.
...
With this we can remove the last use of PathV1 from llvm-ar.cpp.
llvm-svn: 184464
2013-06-20 20:56:14 +00:00
Rafael Espindola
8daed8070b
Use a raw_fd_ostream instead of a std::ofstream.
...
llvm-svn: 184460
2013-06-20 19:50:39 +00:00
Meador Inge
f58d6431f9
Remove the simplify-libcalls pass (finally)
...
This commit completely removes what is left of the simplify-libcalls
pass. All of the functionality has now been migrated to the instcombine
and functionattrs passes. The following C API functions are now NOPs:
1. LLVMAddSimplifyLibCallsPass
2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls
llvm-svn: 184459
2013-06-20 19:48:07 +00:00
Sean Silva
8006fd36a5
[yaml2obj][ELF] Start factoring into "single point of truth".
...
llvm-svn: 184457
2013-06-20 19:11:44 +00:00
Sean Silva
459731fae0
[yaml2obj][ELF] Just let this class own its buffer.
...
llvm-svn: 184456
2013-06-20 19:11:41 +00:00
Rafael Espindola
61a1d241a1
Remove a trivial use of sys::Path.
...
llvm-svn: 184455
2013-06-20 18:55:44 +00:00
Rafael Espindola
ffbd9ee39f
Add support for getting the last modification time from a file_status.
...
Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus.
llvm-svn: 184450
2013-06-20 18:42:04 +00:00
Rafael Espindola
f1ead5434a
Use only the filename when deciding if a file is a duplicate.
...
Matches gnu ar behavior.
llvm-svn: 184448
2013-06-20 18:30:37 +00:00
Rafael Espindola
57dc6d35a3
Add r184420 back, but also handle long file names.
...
Original message:
Don't include directory names in archives.
This matches the behavior of both gnu and os x versions of ar.
llvm-svn: 184423
2013-06-20 13:41:51 +00:00
Rafael Espindola
e6a5ece5c5
Revert "Don't include directory names in archives."
...
This reverts commit 184420.
Investigating the bot failures.
llvm-svn: 184421
2013-06-20 13:23:48 +00:00
Rafael Espindola
aebd457c8d
Don't include directory names in archives.
...
This matches the behavior of both gnu and os x versions of ar.
llvm-svn: 184420
2013-06-20 13:16:44 +00:00
Rafael Espindola
0d52e64b86
Remove remaining bits of the old LLVM specific symtab handling.
...
llvm-svn: 184418
2013-06-20 13:00:30 +00:00
Rafael Espindola
293a58d01c
Remove more unused functions.
...
llvm-svn: 184416
2013-06-20 12:45:47 +00:00
Rafael Espindola
734706c20b
Remove unused methods.
...
llvm-svn: 184415
2013-06-20 12:42:00 +00:00
Rafael Espindola
b974bbf1d3
Use the simpler sys::fs::exists.
...
llvm-svn: 184413
2013-06-20 12:04:39 +00:00
Rafael Espindola
6c06452df3
Convert a use of sys::Path.
...
llvm-svn: 184412
2013-06-20 11:59:19 +00:00
David Blaikie
7637c0313e
llvm-dwarfdump: Add support for dumping the .debug_loc section
...
This is a basic implementation - we still don't have any support (that I
know of) for dumping DWARF expressions in a meaningful way, so the
location information itself is just printed as a sequence of bytes as we
do elsewhere.
llvm-svn: 184361
2013-06-19 21:37:13 +00:00
Rafael Espindola
80c176d465
Remove unused function.
...
llvm-svn: 184359
2013-06-19 21:33:52 +00:00
Rafael Espindola
0449fdea82
Really fix the missing header :-(
...
llvm-svn: 184355
2013-06-19 21:21:43 +00:00
Rafael Espindola
73c8999f27
Add missing include found by the bots.
...
llvm-svn: 184354
2013-06-19 21:20:41 +00:00
Rafael Espindola
a7d761d107
Remove last use of PathV1.h from Archive.h
...
Store the individual fields we need instead of a sys::FileStatus.
llvm-svn: 184353
2013-06-19 21:13:59 +00:00
Rafael Espindola
360f929145
Always set the mode.
...
This matches GNU ar behavior. Also remove the now unused getFileStatus method.
Not sure how to add a test, it would have to run ls -l or something like that.
llvm-svn: 184337
2013-06-19 19:17:15 +00:00
Rafael Espindola
9cf9cbd80e
Remove more uses of sys::Path.
...
llvm-svn: 184328
2013-06-19 17:49:07 +00:00
Rafael Espindola
7aa228a8e4
Remove unused function.
...
llvm-svn: 184320
2013-06-19 16:47:34 +00:00
Rafael Espindola
ad605fef8b
Another attempt at fixing the bots.
...
llvm-svn: 184318
2013-06-19 16:16:13 +00:00
Rafael Espindola
8c2d4ffc5c
Attempt at fixing some bots.
...
llvm-svn: 184316
2013-06-19 15:56:53 +00:00
Rafael Espindola
a05f991a23
Reduce sys::Path usage in llvm-ar.
...
llvm-svn: 184315
2013-06-19 15:45:37 +00:00
Rafael Espindola
39374be683
Remove the 'R' modifier.
...
It is not present in GNU or OS X versions and doesn't make a lot of sense
for llvm-ar.
llvm-svn: 184306
2013-06-19 14:58:16 +00:00
Wan Xiaofei
7823455a4b
Test commit access.
...
llvm-svn: 184278
2013-06-19 02:26:00 +00:00
Sean Silva
b0fb5cb3dc
Remove using namespace
and use explicit qualification.
...
There were only two places it was actually making anything shorter.
llvm-svn: 184273
2013-06-19 01:13:28 +00:00
Sean Silva
c542be787e
Remove spurious space.
...
llvm-svn: 184272
2013-06-19 01:10:58 +00:00
Sean Silva
e9371a8a2c
Remove unused parameter.
...
Not sure why we weren't catching this with -Wunused-parameter...
Spotted by inspection.
llvm-svn: 184271
2013-06-19 01:10:11 +00:00
Sean Silva
a39ac0fdeb
[yaml2obj][ELF] Support ELFOSABI_* enum.
...
llvm-svn: 184268
2013-06-19 00:55:28 +00:00
Sean Silva
5b5567b80b
There is no ELF ABI version enum.
...
llvm-svn: 184267
2013-06-19 00:55:23 +00:00
Sean Silva
c7a5f8cb18
[yaml2obj][ELF] Support st_info through Binding
and Type
YAML keys.
...
llvm-svn: 184263
2013-06-19 00:11:59 +00:00
Sean Silva
af68c9e26b
[yaml2obj][ELF] Don't monkeypatch the YAML sections.
...
Previously, we would monkeypatch the vector of YAML::Section's in order
to ensure that the SHT_NULL entry is present. Now we just add it
unconditionally.
The proliferation of small numerical adjustments is beginning to
frighten me, but I can't think of a way having a single point of truth
for them without introducing a whole new layer of data structures (i.e.
lots of code and complexity) between the YAML and binary ELF formats.
llvm-svn: 184260
2013-06-18 23:37:23 +00:00
Sean Silva
3fd655ca4d
[yaml2obj][ELF] Ensure STN_UNDEF entry is present.
...
llvm-svn: 184258
2013-06-18 23:19:17 +00:00
Sean Silva
beed0c8948
[yaml2obj][ELF] Rudimentary symbol table support.
...
Currently, we only output the name.
llvm-svn: 184255
2013-06-18 23:14:03 +00:00
Sean Silva
396d02068a
[yaml2obj][ELF] Add dummy .strtab section.
...
This will be needed later for holding symbol names, due to the libObject
issue mentioned in the commit message of r184161.
llvm-svn: 184242
2013-06-18 21:37:50 +00:00
Rafael Espindola
7f5c2666a5
Convert most uses of PathV1.h in ToolRunner.cpp.
...
llvm-svn: 184210
2013-06-18 17:20:08 +00:00
Rafael Espindola
18bf1abdc7
Add a version of unique_file that return just the file name.
...
llvm-svn: 184206
2013-06-18 17:01:00 +00:00
Rafael Espindola
ba9d8abd28
Return a std::string from PrependMainExecutablePath.
...
llvm-svn: 184204
2013-06-18 16:47:55 +00:00
Rafael Espindola
45e04133bf
Remove PathV1.h use from BugDriver.cpp.
...
llvm-svn: 184203
2013-06-18 16:21:54 +00:00
Rafael Espindola
14b5a763c3
Remove use of PathV1.h from ExecutionDriver.cpp.
...
llvm-svn: 184202
2013-06-18 16:14:09 +00:00
Rafael Espindola
8e7f40cca7
Remove usage of PathV1.h from OptimizerDriver.cpp.
...
llvm-svn: 184198
2013-06-18 15:54:13 +00:00
Rafael Espindola
3fc12d72c3
Convert some uses of eraseFromDisk.
...
llvm-svn: 184196
2013-06-18 15:33:18 +00:00
Rafael Espindola
8cdee56810
Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.
...
llvm-svn: 184193
2013-06-18 15:29:32 +00:00