summaryrefslogtreecommitdiff
path: root/tools/llvm-extract/llvm-extract.cpp
Commit message (Collapse)AuthorAge
...
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-06
| | | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
* only extract main if the user didn't specify anything to extractAndrew Lenharth2008-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48023 91177308-0d34-0410-b5e6-96231b3b80d8
* make error message reflect default search function nameAndrew Lenharth2008-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48021 91177308-0d34-0410-b5e6-96231b3b80d8
* add a pass that can extract all kinds of global values, not just functions. ↵Andrew Lenharth2008-03-07
| | | | | | Update llvm-extract to use it and optionally extract a global variable if you want it too git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48015 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from tools.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the space in overview output for commands out of each of theDan Gohman2007-10-08
| | | | | | | commands and into the common code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate program name from error message with a :Reid Spencer2007-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40945 91177308-0d34-0410-b5e6-96231b3b80d8
* Terminate an error message with a newline.Reid Spencer2007-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40943 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-05
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* use the new MemoryBuffer interfaces to simplify error reporting in clients.Chris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36900 91177308-0d34-0410-b5e6-96231b3b80d8
* switch tools to bitcode instead of bytecodeChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
* remove EH cruft, add bitcode supportChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36841 91177308-0d34-0410-b5e6-96231b3b80d8
* push bytecode decompressor out through APIs. Now the bytecode readerChris Lattner2007-02-07
| | | | | | | | | | | | | | | | | | | | | api's look like this: ModuleProvider *getBytecodeModuleProvider( const std::string &Filename, ///< Name of file to be read BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer, std::string* ErrMsg = 0, ///< Optional error message holder BytecodeHandler* H = 0 ///< Optional handler for reader events ); This is ugly, but allows a client to say: getBytecodeModuleProvider("foo", 0); If they do this, there is no dependency on the compression libraries, saving codesize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34012 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-05
| | | | | | | | Change getNamedFunction -> getFunction Make llvm-extract run the StripDeadPrototypes pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33921 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-05
| | | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate changes from my local tree. This patch includes:Anton Korobeynikov2007-01-28
| | | | | | | | | | | | | | | | | | | | | | | | 1. New parameter attribute called 'inreg'. It has meaning "place this parameter in registers, if possible". This is some generalization of gcc's regparm(n) attribute. It's currently used only in X86-32 backend. 2. Completely rewritten CC handling/lowering code inside X86 backend. Merged stdcall + c CCs and fastcall + fast CC. 3. Dropped CSRET CC. We cannot add struct return variant for each target-specific CC (e.g. stdcall + csretcc and so on). 4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in on first attribute has meaning 'This is hidden pointer to structure return. Handle it gently'. 5. Fixed small bug in llvm-extract + add new feature to FunctionExtraction pass, which relinks all internal-linkaged callees from deleted function to external linkage. This will allow further linking everything together. NOTEs: 1. Documentation will be updated soon. 2. llvm-upgrade should be improved to translate csret => sret. Before this, there will be some unexpected test fails. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-07
| | | | | | | now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-06
| | | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32250 91177308-0d34-0410-b5e6-96231b3b80d8
* Replacing std::iostreams with llvm iostreams. Some of these changes involveBill Wendling2006-11-29
| | | | | | | | adding a temporary wrapper around the ostream to make it friendly to functions expecting an LLVM stream. This should be fixed in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31990 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass target name into TargetData anymore, it is never used or needed.Chris Lattner2006-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28831 91177308-0d34-0410-b5e6-96231b3b80d8
* extract has been renamed to llvm-extract to avoid conflicting with another toolMisha Brukman2005-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21498 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
* Use binary mode for reading/writing bytecode filesJeff Cohen2005-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351:Reid Spencer2004-12-30
| | | | | | | | | | | * Place a try/catch block around the entire tool to Make sure std::string exceptions are caught and printed before exiting the tool. * Make sure we catch unhandled exceptions at the top level so that we don't abort with a useless message but indicate than an unhandled exception was generated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19192 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* The functions in Signal.h are now in the llvm::sys namespace - adjustReid Spencer2004-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16091 91177308-0d34-0410-b5e6-96231b3b80d8
* Header file movedChris Lattner2004-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13813 91177308-0d34-0410-b5e6-96231b3b80d8
* Add command-line option to select whether to isolate or delete function fromMisha Brukman2004-04-22
| | | | | | | module. Default is `isolate' as before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13113 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to print a stack trace whenever an error signal is delivered toChris Lattner2004-02-19
| | | | | | | the tool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11633 91177308-0d34-0410-b5e6-96231b3b80d8
* Give extract -o and -f options, just like every other tool!Chris Lattner2004-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11580 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix extract to use the right TargetData, like Bugpoint does.Brian Gaeke2003-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9561 91177308-0d34-0410-b5e6-96231b3b80d8
* fix file headerChris Lattner2003-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9294 91177308-0d34-0410-b5e6-96231b3b80d8
* Added copyright header to all C++ source files.John Criswell2003-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9291 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up header, remove extra #includeChris Lattner2003-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8451 91177308-0d34-0410-b5e6-96231b3b80d8
* Make createVerifierPass return a FunctionPass *.Brian Gaeke2003-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8449 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the function extractor pass from tools/extract into lib/Xform/IPOChris Lattner2002-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4759 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix extract to work with constant pointer refs correctlyChris Lattner2002-10-12
| | | | | | | * Extract makes all global vars external, so they don't have initializers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4121 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid making external global variables internalChris Lattner2002-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4059 91177308-0d34-0410-b5e6-96231b3b80d8
* - The extract tool now is sure to extract the function implementation forChris Lattner2002-10-06
| | | | | | | the specified name instead of extracting the prototype if both exist. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4045 91177308-0d34-0410-b5e6-96231b3b80d8
* Print the tool name when an error comes from so that I can tell whichChris Lattner2002-07-30
| | | | | | | tool of a pipeline is having issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3167 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous #includesChris Lattner2002-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3162 91177308-0d34-0410-b5e6-96231b3b80d8
* *** empty log message ***Chris Lattner2002-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3087 91177308-0d34-0410-b5e6-96231b3b80d8
* *** empty log message ***Chris Lattner2002-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3044 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor changes due to code juggled aroundChris Lattner2002-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3039 91177308-0d34-0410-b5e6-96231b3b80d8
* *** empty log message ***Chris Lattner2002-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2985 91177308-0d34-0410-b5e6-96231b3b80d8
* MEGAPATCH checkin.Chris Lattner2002-06-25
| | | | | | | For details, See: docs/2002-06-25-MegaPatchInfo.txt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure the extracted function has external linkage, so that it doesn'tChris Lattner2002-05-23
| | | | | | | get eliminated by globaldce! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2736 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of the "extract" utilityChris Lattner2002-05-22
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2716 91177308-0d34-0410-b5e6-96231b3b80d8