summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve llvm-mc disassembler mode and refactor ARM tests to use itTim Northover2013-07-191-12/+60
| | | | | | | | | | | | | | | | | | This allows "llvm-mc -disassemble" to accept two new features: + Using comma as a byte separator + Grouping bytes with '[' and ']' pairs. The behaviour outside a [...] group is unchanged. But within the group once llvm-mc encounters a true error, it stops rather than trying to resynchronise the stream at the next byte. This is more useful for disassembly tests, where we have an almost-instruction in mind and don't care what the misaligned interpretation would be. Particularly if it means llvm-mc won't actually see the next intended almost-instruction. As a side effect, this means llvm-mc can disassemble its own -show-encoding output if copy-pasted. llvm-svn: 186661
* Revert "COFFDumper: Dump data directory entries."Rui Ueyama2013-07-181-24/+0
| | | | | | Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623. llvm-svn: 186627
* COFFDumper: Dump data directory entries.Rui Ueyama2013-07-181-0/+24
| | | | | | | | | | | | | | | | | Summary: Dump optional data directory entries in the PE/COFF header, so that we can test the output of LLD linker. This patch updates the test binary file, but the source of the binary is the same. I just re-linked the file. I don't know how the previous file was linked, but the previous file did not have any data directory entries for some reason. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1148 llvm-svn: 186623
* llvm-ar: doExtract(): Write extracted files with F_Binary. It should fix ↵NAKAMURA Takumi2013-07-171-1/+1
| | | | | | llvm/test/Object/extract.ll llvm-svn: 186503
* LLVMSymbolize.cpp: Fix build. Triple::ArchType is not a namespace.NAKAMURA Takumi2013-07-171-1/+1
| | | | llvm-svn: 186494
* llvm-symbolizer: be more careful with colons in file namesAlexey Samsonov2013-07-171-8/+7
| | | | llvm-svn: 186493
* Add a wrapper for open.Rafael Espindola2013-07-1611-38/+23
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). llvm-svn: 186447
* On error, close the temporary file descriptor.Rafael Espindola2013-07-161-1/+3
| | | | | | With this change llvm-ar can remove the temporary file on windows too. llvm-svn: 186423
* Use open+fstat instead of stat+open.Rafael Espindola2013-07-161-3/+13
| | | | llvm-svn: 186381
* Remember that we have a null terminated string.Rafael Espindola2013-07-161-4/+4
| | | | | | | This is a micro optimization. Instead of going char*->StringRef->Twine->char*, go char*->Twine->char* and avoid having to copy the filename on the stack. llvm-svn: 186380
* Try to open the file before use data from stat.Rafael Espindola2013-07-131-2/+3
| | | | | | | Looks like on mingw we get bogus last modification times on directories. Should fix the mingw bots. llvm-svn: 186240
* Remove unused file. Thanks to Sean Silva for noticing it.Rafael Espindola2013-07-131-419/+0
| | | | llvm-svn: 186239
* Add r186216 back, but make the test tolerant of different uids and gids.Rafael Espindola2013-07-131-1/+1
| | | | | | | original message: Fix a off by one error about which members need to use the string table. llvm-svn: 186238
* Revert commit r186217 -- this is breaking bots:Chandler Carruth2013-07-133-0/+8
| | | | | | | | | | http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328 Original commit log: Use the function attributes to pass along the stack protector buffer size. llvm-svn: 186234
* Revert commit r186216 -- it's breaking bots:Chandler Carruth2013-07-131-1/+1
| | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/6897/steps/check-all/logs/LLVM%3A%3Aarchive-format.test Original commit log: Fix a off by one error about which members need to use the string table. llvm-svn: 186232
* Use the function attributes to pass along the stack protector buffer size.Bill Wendling2013-07-123-8/+0
| | | | | | | Now that we have robust function attributes, don't use a command line option to specify the stack protecto buffer size. llvm-svn: 186217
* Fix a off by one error about which members need to use the string table.Rafael Espindola2013-07-121-1/+1
| | | | llvm-svn: 186216
* fix autoconf buildRafael Espindola2013-07-121-1/+1
| | | | llvm-svn: 186200
* Fix the build with c++03.Rafael Espindola2013-07-121-4/+2
| | | | llvm-svn: 186198
* Change llvm-ar to use lib/Object.Rafael Espindola2013-07-126-1182/+346
| | | | | | | | | | | | | | | | | | | | | | This fixes two bugs is lib/Object that the use in llvm-ar found: * In OS X created archives, the name can be padded with nulls. Strip them. * In the constructor, remember the first non special member and use that in begin_children. This makes sure we skip all special members, not just the first one. The change to llvm-ar itself consist of * Using lib/Object for reading archives instead of ArchiveReader.cpp. * Writing the modified archive directly, instead of creating an in memory representation. The old Archive library was way more general than what is needed, as can be seen by the diffstat of this patch. Having llvm-ar using lib/Object now opens the way for creating regular symbol tables for both native objects and bitcode files so that we can use those archives for LTO. llvm-svn: 186197
* Add static.Rafael Espindola2013-07-121-33/+25
| | | | llvm-svn: 186170
* llvm-ar: Clean up memory management with OwningPtr.Benjamin Kramer2013-07-111-15/+9
| | | | llvm-svn: 186131
* Use %llu to print a 64 bit number. Should fix the ARM bots.Rafael Espindola2013-07-111-1/+1
| | | | llvm-svn: 186113
* InsertBefore is the same as AddBefore. Delete it.Rafael Espindola2013-07-111-5/+4
| | | | llvm-svn: 186094
* Fix a FIXME about the format and add a test.Rafael Espindola2013-07-111-7/+5
| | | | | | | While at it, use strftime on Unix too and use the thread safe versions of localtime. llvm-svn: 186090
* Remove the 'N' modifier from llvm-ar.Rafael Espindola2013-07-111-45/+11
| | | | | | | | * It is not present on OS X. * It is untested. * It is not needed for using ar in a build system. llvm-svn: 186080
* Delete dead code.Rafael Espindola2013-07-111-3/+0
| | | | llvm-svn: 186079
* Remove support for truncating names in archives.Rafael Espindola2013-07-113-42/+9
| | | | | | | | | | * All systems we support have some form of long name support. * The options has different names and semantics in different implementations ('f' on gnu, 'T' on OS X), which makes it unlikely it is normally used on build systems. * It was completely untested. llvm-svn: 186078
* Sync llvm-ar's help string with the options it supports.Rafael Espindola2013-07-111-3/+0
| | | | llvm-svn: 186076
* Don't crash in 'llvm -s' when an archive has no symtab.Rafael Espindola2013-07-101-11/+14
| | | | llvm-svn: 186029
* Don't run internalize if we're outputing bit-code and not an object file.Bill Wendling2013-07-081-2/+4
| | | | | | | | | | The problem with running internalize before we're ready to output an object file is that it may change a 'weak' symbol into an internal one, but that symbol could be needed by an external object file --- e.g. with arclite. <rdar://problem/14334895> llvm-svn: 185882
* Create files with the correct permission instead of changing it afterwards.Rafael Espindola2013-07-081-9/+6
| | | | | | No intended functionality change. llvm-svn: 185832
* Fixes problem when calling llvm-ar from an unmodifiable directory.Manuel Klimek2013-07-081-2/+2
| | | | | | | | | This fixes a regression introduced by r185726: the new call to get a unique file does not prepend the system temporary directory, so we need to anchor on the file that the temporary file gets moved to to ensure we're on the same file system. llvm-svn: 185825
* COFFDumper: Print uint64_t with the right format string.Benjamin Kramer2013-07-061-3/+3
| | | | | | I wish we could typecheck llvm::format. llvm-svn: 185766
* [llvm-ar] Added llvm_unreachable to quiet -Wreturn-type warnings.Michael Gottesman2013-07-061-0/+2
| | | | llvm-svn: 185751
* Add a createUniqueFile function and switch llvm's users of unique_file.Rafael Espindola2013-07-055-15/+15
| | | | | | | | | | | | | | This function is complementary to createTemporaryFile. It handles the case were the unique file is *not* temporary: we will rename it in the end. Since we will rename it, the file has to be in the same filesystem as the final destination and we don't prepend the system temporary directory. This has a small semantic difference from unique_file: the default mode is 0666. This matches the behavior of most unix tools. For example, with this change lld now produces files with the same permissions as ld. I will add a test of this change when I port clang over to createUniqueFile (next commit). llvm-svn: 185726
* Use sys::fs::createTemporaryFile.Rafael Espindola2013-07-053-12/+11
| | | | llvm-svn: 185719
* Don't create an archive if, for example, we are asked to print the index.Rafael Espindola2013-07-051-2/+19
| | | | llvm-svn: 185697
* Use simpler version of exists.Rafael Espindola2013-07-051-2/+1
| | | | llvm-svn: 185695
* Remove NoOperation.Rafael Espindola2013-07-051-5/+1
| | | | | | | parseCommandLine prints and error and exists if no operation is specified, so it never returns NoOperation. llvm-svn: 185691
* Don't treat bitcode files specially in llvm-ar.Rafael Espindola2013-07-055-34/+2
| | | | | | | We really want bitcode files to behave as regular object files in archives, so we don't need to track that a member is bitcode. llvm-svn: 185681
* Make llvm-nm return 1 on error.Rafael Espindola2013-07-031-0/+8
| | | | | | | This is a small compatibility improvement with gnu nm and makes llvm-nm more useful as a testing tool. llvm-svn: 185546
* Remove address spaces from MC.Rafael Espindola2013-07-021-3/+2
| | | | | | | | This is dead code since PIC16 was removed in 2010. The result was an odd mix, where some parts would carefully pass it along and others would assert it was zero (most of the object streamer for example). llvm-svn: 185436
* llvm-symbolizer: Recognize a drive letter on win32. Then "REQUIRES: shell" ↵NAKAMURA Takumi2013-07-011-0/+5
| | | | | | | can be removed. FIXME: Could we use llvm::sys::Path here? llvm-svn: 185322
* The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD.Sylvestre Ledru2013-07-011-3/+3
| | | | | | | | | | | | | | | | | This kind of simplification is sometimes useful, but in general it's not correct. As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the build definitions used for FreeBSD, whereas for userland-related issues we want to match the definitions used for other systems with Glibc. The current modification adjusts the build system so that they can be distinguished, and explicitly adds GNU/kFreeBSD to the build checks in which it belongs. Fixes bug #16444. Patch by Robert Millan in the context of Debian. llvm-svn: 185311
* Add flag to lli to enable debugging of IR when used with MCJIT.Daniel Malea2013-06-284-3/+19
| | | | | | | | | | | | | | | | | | - warn users when -debug-ir is used with old JIT engine (only partial debug info is available) For example, to debug an IR file with GDB (that supports JIT registration), do: $ gdb --args lli -use-mcjit -debug-ir testcase.ll (gdb) break main (gdb) run <Process continues to lli main> (gdb) continue <Process continues to testcase.ll main() (gdb) step <Now stepping through the LLVM IR in testcase.ll> llvm-svn: 185197
* Fix bugpoint execution/reference output file nameHal Finkel2013-06-282-2/+2
| | | | | | | | | sys::fs::unique_file will now loop infinitely if provided with a file name without '%' characters and the input file already exists. As a result, bugpoint cannot use a fixed file name for the execution output (including the reference output). llvm-svn: 185166
* llvm-symbolizer: don't leave dangling pointers after flushing ↵Alexey Samsonov2013-06-282-0/+5
| | | | | | LLVMSymbolizer. Add a destructor. llvm-svn: 185154
* llvm-symbolizer: skip leading underscore in Mach-O symbol table entriesAlexey Samsonov2013-06-281-0/+3
| | | | llvm-svn: 185151
* llvm-symbolizer: make name demangling a public static method of LLVMSymbolizerAlexey Samsonov2013-06-282-9/+11
| | | | llvm-svn: 185143
OpenPOWER on IntegriCloud