summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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
* llvm-symbolizer: add support for Mach-O universal binariesAlexey Samsonov2013-06-283-42/+101
| | | | llvm-svn: 185137
* Debug Info: clean up usage of Verify.Manman Ren2013-06-281-2/+5
| | | | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. Also update testing cases to make them conform to the format of DI classes. llvm-svn: 185135
* Revert "Debug Info: clean up usage of Verify." as it's breaking bots.Eric Christopher2013-06-261-2/+2
| | | | | | This reverts commit r185020 llvm-svn: 185032
* Debug Info: clean up usage of Verify.Manman Ren2013-06-261-2/+2
| | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. llvm-svn: 185020
* Use enums instead of raw octal values.Rafael Espindola2013-06-261-1/+1
| | | | | | Patch by 罗勇刚(Yonggang Luo). llvm-svn: 184971
* Remove unused includes.Rafael Espindola2013-06-262-2/+0
| | | | | | llvm itself is now PathV1 clean. llvm-svn: 184947
* Provide bootstrap support to build only llvm+clang when using cmake.Andy Gibbs2013-06-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Where a source tree is complete with lld, lldb and polly, it may not be possible to use cmake to configure build scripts if the host compiler it not capable of compiling these sub-projects. This change makes it possible to first build a bootstrap clang compiler when can then be used to build a complete llvm toolchain. An example bootstrap build sequence could be as follows: $ mkdir bootstrap $ cd bootstrap $ cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_PREFIX_PATH:STRING=$(pwd) -DLLVM_TARGETS_TO_BUILD:STRING=host -DLLVM_INCLUDE_TOOLS:STRING=bootstrap-only ../source $ make clang # build clang only for host $ cd .. $ export CC=$(realpath bootstrap/bin)/clang $ export CXX=$(realpath bootstrap/bin)/clang++ $ mkdir final $ cd final $ cmake -G 'Unix Makefiles' ../source $ make all check-all llvm-svn: 184924
* Port GetMainExecutable over to PathV2.Rafael Espindola2013-06-262-5/+5
| | | | | | I will remove the V1 version as soon as I change clang in the next commit. llvm-svn: 184914
* Move GetEXESuffix to the one place it is used.Rafael Espindola2013-06-251-1/+7
| | | | llvm-svn: 184853
* keep only the StringRef version of getFileOrSTDIN.Rafael Espindola2013-06-252-2/+2
| | | | llvm-svn: 184826
* Create the file with the right permissions instead of setting it afterwards.Rafael Espindola2013-06-221-9/+1
| | | | | | Removes the last use of PathV1.h in llvm-ar. llvm-svn: 184630
* [yaml2obj][ELF] Make symbol table top-level key.Sean Silva2013-06-221-9/+11
| | | | | | | | | Although in reality the symbol table in ELF resides in a section, the standard requires that there be no more than one SHT_SYMTAB. To enforce this constraint, it is cleaner to group all the symbols under a top-level `Symbols` key on the object file. llvm-svn: 184627
* [yaml2obj][ELF] Narrow parameter.Sean Silva2013-06-221-6/+6
| | | | | | The full ELFYAML::Section isn't needed. llvm-svn: 184626
* [yaml2obj][ELF] Don't special case writing these.Sean Silva2013-06-221-2/+2
| | | | | | | Just add them to the vector of section headers like the rest of the section headers. llvm-svn: 184624
* [yaml2obj][ELF] Make this "type switch" actually readable.Sean Silva2013-06-221-7/+20
| | | | llvm-svn: 184623
* [yaml2obj][ELF] Align section contents in the output.Sean Silva2013-06-221-8/+17
| | | | | | | | | | The improperly aligned section content in the output was causing buildbot failures. This should fix them. Incidentally, this results in a simpler and more robust API for ContiguousBlobAccumulator. llvm-svn: 184621
* Convert some uses of PathV1.h in ArchiveWriter.cpp.Rafael Espindola2013-06-212-28/+29
| | | | llvm-svn: 184599
* [yaml2obj][ELF] Allow expressing undefined symbols.Sean Silva2013-06-211-7/+9
| | | | | | | | | | Previously we unconditionally enforced that section references in symbols in the YAML had a name that was a section name present in the object, and linked the references to that section. Now, permit empty section names (already the default, if the `Section` key is not provided) to indicate SHN_UNDEF. llvm-svn: 184513
* Unbreak bots. Didn't realize this was a C++11 feature.Sean Silva2013-06-211-5/+6
| | | | llvm-svn: 184508
* [yaml2obj][ELF] Don't explicitly set `Binding` with STB_*Sean Silva2013-06-211-24/+33
| | | | | | | | | | | | | | | Instead, just have 3 sub-lists, one for each of {STB_LOCAL,STB_GLOBAL,STB_WEAK}. This allows us to be a lot more explicit w.r.t. the symbol ordering in the object file, because if we allowed explicitly setting the STB_* `Binding` key for the symbol, then we might have ended up having to shuffle STB_LOCAL symbols to the front of the list, which is likely to cause confusion and potential for error. Also, this new approach is simpler ;) llvm-svn: 184506
OpenPOWER on IntegriCloud