aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-ld/llvm-ld.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-12-18Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.Michael J. Spencer1-6/+3
llvm-svn: 122157
2010-12-18Revert r122143 through r122140, which collectively broke the LLVMC tests onOwen Anderson1-3/+6
the buildbots. llvm-svn: 122149
2010-12-18Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.Michael J. Spencer1-6/+3
llvm-svn: 122141
2010-11-29Merge System into Support.Michael J. Spencer1-2/+2
llvm-svn: 120298
2010-11-03Rename FindExecutable to PrependMainExecutablePath.Mikhail Glushenkov1-6/+6
Makes it more clear that it is just a path manipulation function. llvm-svn: 118174
2010-11-02GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.Mikhail Glushenkov1-1/+1
This allows using GetDLLSuffix() with appendSuffix(). llvm-svn: 118051
2010-11-02Trailing whitespace.Mikhail Glushenkov1-10/+10
llvm-svn: 118050
2010-10-19Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson1-0/+11
exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
2010-10-07Move tool_output_file into its own file.Dan Gohman1-1/+1
llvm-svn: 115973
2010-09-01Make tool_output_file's raw_ostream instance a member variable insteadDan Gohman1-6/+6
of a base class. This makes it possible to unregister the file from FilesToRemove when the file is done. Also, this eliminates the need for formatted_tool_output_file. llvm-svn: 112706
2010-08-20Convert tools to use tool_output_file, and introduce errorDan Gohman1-4/+8
checking to places which previously lacked it. llvm-svn: 111651
2010-08-20Print chatty verbose messages to errs() instead of outs().Dan Gohman1-7/+7
llvm-svn: 111599
2010-05-07don't pass -f to llc, it doesn't have it anymore. Patch by Kevin Fan (PR7090)Chris Lattner1-2/+0
llvm-svn: 103263
2010-04-17Fix more -Wcast-qual warnings.Dan Gohman1-1/+1
llvm-svn: 101656
2010-03-30Fix llvm-ld to clean up its output files in case of an error.Dan Gohman1-38/+48
llvm-svn: 99915
2010-03-27revert r99719 which is breaking the botz.Chris Lattner1-18/+6
llvm-svn: 99721
2010-03-27Make llvm-ld remove its output files in the event of an error.Dan Gohman1-6/+18
llvm-svn: 99719
2010-03-27No need to check the same condition twice.Dan Gohman1-1/+1
llvm-svn: 99716
2010-03-24Trim #includes.Dan Gohman1-1/+0
llvm-svn: 99416
2010-03-24It's not necessary to call raw_ostream::close explicitly on automaticDan Gohman1-4/+0
raw_ostream variables immediately before they go out of scope. llvm-svn: 99413
2010-03-23make sure to delete the llvm module before calling llvm_shutdown,Chris Lattner1-23/+25
this fixes crashes in error cases, PR6683 llvm-svn: 99334
2010-01-28Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer1-2/+3
llvm-svn: 94746
2009-10-22llvm-ld doesn't throw.Chris Lattner1-172/+167
llvm-svn: 84819
2009-08-25Make LLVM command-line tools overwrite their output files without -f.Dan Gohman1-4/+3
This is conventional command-line tool behavior. -f now just means "enable binary output on terminals". Add a -f option to llvm-extract and llvm-link, for consistency. Remove F_Force from raw_fd_ostream and enable overwriting and truncating by default. Introduce an F_Excl flag to permit users to enable a failure when the file already exists. This flag is currently unused. Update Makefiles and documentation accordingly. llvm-svn: 79990
2009-08-23Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner1-8/+8
forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
2009-08-23Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner1-4/+4
instead of as two bools. Use this to add a F_Append flag which has the obvious behavior. Other unrelated changes conflated into this patch: 1. REmove EH stuff from llvm-dis and llvm-as, the try blocks are dead. 2. Simplify the filename inference code in llvm-as/llvm-dis, because raw_fd_ostream does the right thing with '-'. 3. Switch machine verifier to use raw_ostream instead of ostream (Which is the thing that needed append in the first place). llvm-svn: 79807
2009-08-05Use (void *)(intptr_t) to cast function addresses to void*Dan Gohman1-3/+3
for use with sys::Path::GetMainExecutable, to avoid warnings with -pedantic. llvm-svn: 78245
2009-08-05Fix FindExecutable to use sys::Path::GetMainExecutable instead ofDan Gohman1-10/+13
just argv[0]. And remove the code for searching the current working directory and for searching PATH; the point of FindExecutable is not to find whatever version of the executable can be found by searching around, but to find an executable that accompanies the current executable. Update the tools to use sys::Program::FindProgramByName when they want PATH searching. llvm-svn: 78240
2009-07-22Added -b option to override the default bitcode output file name.Sanjiv Gupta1-10/+18
llvm-svn: 76768
2009-07-16Convert more tools code from cerr and cout to errs() and outs().Dan Gohman1-18/+18
llvm-svn: 76070
2009-07-16Kill off last uses of TargetMachineRegistry class.Daniel Dunbar1-1/+0
llvm-svn: 75892
2009-07-15To simplify the upcoming context-on-type change, switch all command line ↵Owen Anderson1-1/+1
tools to using the default global context for now. This will let us to hardwire stuff to the global context in the short term while the API is sorted out. llvm-svn: 75846
2009-07-01Hold the LLVMContext by reference rather than by pointer.Owen Anderson1-1/+1
llvm-svn: 74640
2009-07-01Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson1-2/+4
LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
2009-03-06Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner1-2/+6
their main routines. This makes the tools print their argc/argv commands if they crash. llvm-svn: 66248
2009-01-05make llvm-ld smart enough to link against native libraries that are Chris Lattner1-2/+18
not in system library directories by checking -L paths as well. Patch by Axel Naumann! llvm-svn: 61730
2008-11-19ignore the -m elf_i386 directive used in the linux kernelAndrew Lenharth1-0/+3
llvm-svn: 59642
2008-06-27Since we are using GCC to assemble the program, make sure the assembly ↵Argyrios Kyrtzidis1-0/+3
syntax is AT&T. llvm-svn: 52827
2008-06-15Add an "exe" suffix only if the output file has no suffix at all.Argyrios Kyrtzidis1-8/+8
llvm-svn: 52289
2008-06-15Make sure all produced executable files have "exe" suffix on Windows.Argyrios Kyrtzidis1-10/+16
With this more general way, -native and -native-cbe options are handled too. llvm-svn: 52287
2008-06-15Append "exe" suffix to executable files.Argyrios Kyrtzidis1-1/+11
llvm-svn: 52285
2008-02-20Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov1-0/+1
annoying warnings. llvm-svn: 47367
2008-01-27Add support for frameworks. Patch by Shantonu Sen!Chris Lattner1-3/+20
llvm-svn: 46421
2008-01-09Fix llvm-ld -Xlinker, patch by Daniel Teske!Chris Lattner1-3/+1
llvm-svn: 45770
2007-12-29remove attributions from tools.Chris Lattner1-2/+2
llvm-svn: 45421
2007-10-08Move the space in overview output for commands out of each of theDan Gohman1-1/+1
commands and into the common code. llvm-svn: 42752
2007-07-23Remove dead option.Reid Spencer1-3/+0
llvm-svn: 40415
2007-07-05Here is the bulk of the sanitizing.Gabor Greif1-33/+33
Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
2007-06-19Fix pr1448Chris Lattner1-14/+20
llvm-svn: 37658
2007-05-06switch tools to bitcode instead of bytecodeChris Lattner1-12/+1
llvm-svn: 36868