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
Alexey Samsonov
50c414e3d0
Basic support for parsing Mach-O universal binaries in LLVMObject library
...
llvm-svn: 184191
2013-06-18 15:03:28 +00:00
Bill Wendling
49ef14ef73
Use pointers to the MCAsmInfo and MCRegInfo.
...
Someone may want to do something crazy, like replace these objects if they
change or something.
No functionality change intended.
llvm-svn: 184175
2013-06-18 07:20:20 +00:00
Sean Silva
2bfc77ced4
[yaml2obj][ELF] Factor out string table section creation.
...
llvm-svn: 184162
2013-06-18 01:11:27 +00:00
Sean Silva
034418b820
[yaml2obj][ELF] Refer specifically to the section header string table.
...
A bug in libObject will cause it to assert() if a symbol table's string
table and the section header string table are the same section, so we
need to ensure that we emit two different string tables (among other
things). The problematic code is the hardcoded usage of ".strtab"
(`dot_strtab_sec`) for looking up symbol names in
ELFObjectFile<ELFT>::getSymbolName.
I discussed this with Michael, and he has some local improvements to the
ELF code in libObject that, among other things, should fix our handling
of this scenario.
llvm-svn: 184161
2013-06-18 01:11:24 +00:00
Sean Silva
5a0f79505b
[yaml2obj][ELF] Ensure more fields are zero'd.
...
I was spotting garbage in the output. I'd like to just zero the entire
ELFYAML::Section to be sure, but it contains non-POD types. (I'm also
trying to avoid bloating the ELFYAML::Foo classes with a bunch of
constructor code).
No test, since this is by its very nature unpredictable. I'm pretty sure
that one of the sanitizers would catch it immediately though.
llvm-svn: 184160
2013-06-18 01:11:21 +00:00
Rafael Espindola
6a0b079beb
Fix the build with gcc 4.7 and -std=c++11.
...
The error message was:
/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp: In function ‘ld_plugin_status cleanup_hook()’:
/home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp:461:30: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string<char>}’ through ‘...’
I will check if this was a clang or gcc issue.
llvm-svn: 184138
2013-06-17 22:24:06 +00:00