Commit Graph

417 Commits

Author SHA1 Message Date
Chris Lattner
23d7b36117 add a highly efficient hash table that is specialized for mapping C strings
to some other type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 23:42:03 +00:00
Chris Lattner
9f617d64c5 Add a new llvm::Allocator abstraction, which will be used by a container
I'm about to add.  This is similar to, but necessarily different than, the
STL allocator class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31285 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 22:08:03 +00:00
Jim Laskey
a97c67c866 Try again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 09:19:59 +00:00
Jim Laskey
d8cb446aa2 Not handling zero length strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 08:27:07 +00:00
Jim Laskey
2ac33c447d SmallVector append not insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31224 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 19:38:32 +00:00
Jim Laskey
47ce6b4752 Grrr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31223 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 19:20:12 +00:00
Jim Laskey
788a0c6a18 Temp patch for missing functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 19:14:16 +00:00
Bill Wendling
160db5d20a MathExtras isn't in the llvm/ADT directory but in the llvm/Support directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31219 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 18:47:29 +00:00
Jim Laskey
18529f3515 Apply editorials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31218 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 18:05:12 +00:00
Jim Laskey
0e5af195f6 Breakout folding hash set from SelectionDAGCSEMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31215 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 16:16:16 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Reid Spencer
bfb8eaff73 Beef up the output from DiffFilesWithTolerance by setting the error code
to describe the difference being reported. This assists with understanding
differences an llvm-test and should help with bugpoint too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31044 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-18 20:23:52 +00:00
Chris Lattner
efa3da5593 avoid a ctor/dtor issue with the ProgramName global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 00:06:24 +00:00
Chris Lattner
500d8bff20 shrink anon-ns and mark stuff static. No functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30922 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 22:09:17 +00:00
Chris Lattner
c055a9191f Fix a static dtor issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 22:13:11 +00:00
Chris Lattner
90aa839c88 Fix more static dtor issues
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 21:52:35 +00:00
Chris Lattner
151880b020 Define this in the correct n/s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30671 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-29 18:43:14 +00:00
Chris Lattner
193c2d886f Simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30658 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:14:29 +00:00
Chris Lattner
771cbf30bc new helper class to provide more explicit management of static ctor/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:31:55 +00:00
Chris Lattner
52c917190a Instantiate Statistic<> in one place, not in every .o file that uses it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 04:17:00 +00:00
Chris Lattner
232885873f Minor code cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29917 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:10:29 +00:00
Chris Lattner
7422a76100 Add external definitions for commonly-used template specializations and add
anchor methods to others.  This eliminates the vtable/template method bloat
in .o files that defining a cl::opt used to impose (~4K per .o file for one
cp::opt<unsigned>).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29909 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 12:45:47 +00:00
Reid Spencer
7b7a1be856 Remove a character to avoid line exceeding 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29860 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 22:39:25 +00:00
Reid Spencer
81bc5088dd For PR797:
This library no longer throws nor handles exceptions, so turn off the
REQUIRES_EH flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29849 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:39:25 +00:00
Reid Spencer
30493372f3 For PR797:
Final remove of exception handling from this file. lib/System can no longer
throw exceptions so there's no need for try/catch blocks here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29848 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:37:59 +00:00
Reid Spencer
6f4c60770c Make the ProgramName variable a std::string so we can eliminate the path
portion fo the program name via sys::Path().getLast(). This makes error
messages more readable since this is invariably used only in error
messages.  Instead of:
  /path/to/llvm/bin/directory/toolname: error message
we will now get:
  toolname: error message
Also, since we always have a program name (even if its defaulted), don't
check to see if it is set or not when generating error messages. This
eliminates a bunch of constant strings, saving a little under 1K of data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29842 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 07:10:06 +00:00
Reid Spencer
8627969597 For PR797:
Adjust users of MappedFile to its new non-throwing interface.  Note that in
most cases the lazy step of just throwing after a call to MappedFile was
installed. This was done in the name of incremental changes. Getting rid of
the new throw statements will take adjustment of interfaces and propagation
of errors to higher levels.  Those changes will come in subsequent patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29817 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 16:06:27 +00:00
Jim Laskey
6f397bf4c8 Adding new Dwarf constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29798 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 21:18:10 +00:00
Reid Spencer
8ea5ecb056 For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 06:04:45 +00:00
Reid Spencer
023fcf9776 For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 02:04:43 +00:00
Chris Lattner
f42d1ddb18 remove IncludeFile turds in MathExtras.h, which bloats every .o file that
#includes it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29639 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 23:52:54 +00:00
Reid Spencer
dc4f6bea6c Remove the use of "IncludeFile" from this support facility. The mechanism
to build a loadable module is now correctly defined and documented so this
workaround isn't needed any longer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29553 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 23:20:15 +00:00
Jim Laskey
abe0e3e641 If the Program name was NULL then all further output sent to std::cerr was
suppressed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29477 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 20:15:56 +00:00
Chris Lattner
65a392ebea Finegrainify namespacification, minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29399 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:21:01 +00:00
Chris Lattner
252ad03d7d Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:03:44 +00:00
Chris Lattner
3236ced25f libsupport still throws.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:01:01 +00:00
Reid Spencer
7107c3badf For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 16:18:00 +00:00
Chris Lattner
433fd76e51 Add an out-of-line virtual method to provide a home for the cl::option class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 23:59:33 +00:00
Chris Lattner
53eca9466f Add two helpers for escaping and unescaping strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29151 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 22:54:39 +00:00
Chris Lattner
17aa9d3f53 LoadLibraryPermanently no longer throws an exception, so this code doesn't have
to catch it.  Other minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29050 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:14:04 +00:00
Chris Lattner
bbf34398a0 This patch (written by Reid) changes compressor to never throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29045 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:00:12 +00:00
Chris Lattner
148f440635 Modify the SlowOperationInformer interface to not throw exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29028 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 22:34:06 +00:00
Chris Lattner
3fc2f4e83f Print LLVM version info like this:
Low Level Virtual Machine (http://llvm.org/):
  llvm version 1.8cvs
  DEBUG build with assertions.

instead of like this:

Low Level Virtual Machine (llvm) 1.8cvs (see http://llvm.org/) ASSERTIONS ENABLED

Also, add a place for vendor version info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29020 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 18:33:03 +00:00
Reid Spencer
9d5b532de9 For PR801:
Refactor the Graph writing code to use a common implementation which is
now in lib/Support/GraphWriter.cpp. This completes the PR.

Patch by Anton Korobeynikov. Thanks, Anton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 16:49:46 +00:00
Chris Lattner
70aa33ee37 Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 16:53:47 +00:00
Jim Laskey
f8a01a9661 1. Support standard dwarf format (was bootstrapping in Apple format.)
2. Add vector support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28807 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 20:51:43 +00:00
Reid Spencer
6df60a9eff For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:00:19 +00:00
Chris Lattner
fc790168a2 Move toolrunner out of libsupport into the bugpoint tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:31:36 +00:00
Reid Spencer
51ab5c8862 Add the -Xlinker option to bugpoint which allows an option to be passed
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 00:00:42 +00:00
Reid Spencer
515b5b379f Make it possible to override the standard version printer. Not all tools
built with CommandLine.h will want the --version option to report that the
tool belongs to LLVM. To override simply pass a void func() to the
cl::SetVersionPrinter() function and that void func() will be called when
it is time to print the version information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:22:56 +00:00