Chris Lattner
b1e00216d7
Fix bugpoint miscompilation support on OS/X
...
Patch contributed by the fabulous Nate Begeman.
llvm-svn: 14994
2004-07-19 06:00:17 +00:00
Chris Lattner
9d3ff75eba
Add a workaround for a GCC 3.3.2 bug
...
llvm-svn: 14976
2004-07-18 21:56:20 +00:00
Misha Brukman
ae7301c8b1
Correctly build shared objects on MacOS X for debugging code generators
...
llvm-svn: 14892
2004-07-16 19:45:45 +00:00
Chris Lattner
ffd5effa5f
Bug fixes for PR341
...
llvm-svn: 14838
2004-07-15 01:29:12 +00:00
Chris Lattner
20b8801a35
Implicitly getting a new option by linking to support.o instead of support.a
...
is a bad idea. Make tools that want the option #include PluginSupport.h
explicitly.
llvm-svn: 14738
2004-07-11 01:04:33 +00:00
Chris Lattner
0939a316d6
Do not call Type::getUniqueID
...
llvm-svn: 14706
2004-07-08 22:09:34 +00:00
Brian Gaeke
b189dba59c
Work around apparent Apple compiler bug which was making all mangled
...
names start with l0_.
llvm-svn: 14651
2004-07-06 20:29:05 +00:00
Reid Spencer
50ec3f9325
Add #include <iostream> since Value.h does not #include it any more.
...
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Chris Lattner
5d7966a0ea
Fix compilation on internix
...
llvm-svn: 14588
2004-07-03 01:21:05 +00:00
Brian Gaeke
003c5ba4d0
Wrapper for c99 isnan()
...
llvm-svn: 14338
2004-06-22 23:54:38 +00:00
Misha Brukman
14bac9f37e
* Fix file header and name
...
* Order #includes alphabetically
llvm-svn: 14234
2004-06-18 15:38:49 +00:00
Misha Brukman
86cea2f60a
Use the machine-independent method of querying the page size.
...
llvm-svn: 14233
2004-06-18 15:34:07 +00:00
Chris Lattner
fef60b53ff
Make all of this functionality work directly on win32. Properly conditionalize
...
system specific stuff on HAVE_MKSTEMP
llvm-svn: 14051
2004-06-07 19:37:24 +00:00
Chris Lattner
18512612b7
Implement getTimeRecord natively in Win32, properly conditionalize the
...
getrusage implementation on HAVE_GETRUSAGE
llvm-svn: 14050
2004-06-07 19:34:51 +00:00
Alkis Evlogimenos
65de990145
Include cerrno.
...
llvm-svn: 14041
2004-06-05 08:59:43 +00:00
Chris Lattner
2a058b248c
Implement the new CopyFile function
...
llvm-svn: 13945
2004-06-02 00:52:22 +00:00
Misha Brukman
cc25fb9142
Fix spelling, trim empty space, tighten up function header comment.
...
llvm-svn: 13940
2004-06-02 00:09:46 +00:00
Reid Spencer
00aca582a2
Moved this file to lib/Bytecode/Writer because its used there only.
...
llvm-svn: 13900
2004-05-30 00:09:32 +00:00
Chris Lattner
f1e8e0a0cf
Thoroughly rehack the dynamic linking mechanisms on Win32. The Win32
...
dynamic linker does not automatically search libraries when looking up
symbols with GetProcAddress. Because of this we have to emulate it. The
only detail is that there doesn't seem to be a way to enumerate the
libraries loaded, so we have a gross hack (tm).
This make the JIT functional on win32 under cygwin.
llvm-svn: 13887
2004-05-28 23:54:07 +00:00
Chris Lattner
1909d2de05
Prune #includes
...
llvm-svn: 13886
2004-05-28 23:35:39 +00:00
Chris Lattner
928f12aa15
Add support for getting executable memory on Windows. This is actually
...
much easier than on unix. :) The only evil thing is that windows.h defines
a macro named FindExecutable, which collides with one of our names.
The JIT now runs on windows, but it cannot resolve external functions
(like printf) yet.
llvm-svn: 13871
2004-05-28 01:20:58 +00:00
Chris Lattner
2df71158fb
Add a new function for the JIT. libsupport is now the only library that
...
includes mman.h
llvm-svn: 13870
2004-05-28 00:59:40 +00:00
Chris Lattner
12e4e9ea43
Add support for zero length files
...
llvm-svn: 13866
2004-05-28 00:34:42 +00:00
Chris Lattner
77bd6789a8
Add a pair of functions to hide system specific details of mapping a file in for reading.
...
llvm-svn: 13863
2004-05-28 00:23:48 +00:00
Chris Lattner
b45f773d5f
Add DynamicLinker support for systems that provide windows.h
...
llvm-svn: 13851
2004-05-27 20:53:10 +00:00
Chris Lattner
a07e742087
Signals.h header moved. Eventually this should move into a lib/System library,
...
but not right now.
llvm-svn: 13811
2004-05-27 05:31:24 +00:00
Chris Lattner
fa8fd150ca
Changes to make libSupport build on systems that don't have the wait syscall.
...
llvm-svn: 13806
2004-05-27 01:20:55 +00:00
Reid Spencer
96fe333298
Put SlotTable.h inclusion back at front of list to be coding standards
...
compliant. Thanks, Chris.
llvm-svn: 13771
2004-05-25 20:09:05 +00:00
Reid Spencer
dc5f9c805c
Make some improvements suggested by Chris.
...
llvm-svn: 13765
2004-05-25 19:03:21 +00:00
Reid Spencer
92adcaf58c
Adding the initial implementation of the SlotTable class. This class is
...
the Abstract Data Type that holds slot number values and associates them
with Type* and Value*. The SlotTable is simply the holder of the slot
numbers and provides a controlled interface for building the table. It does
not enforce any particular idiom or functionality for manipulating the slot
numbers.
This is part of bug_122. The SlotCalculator and SlotMachine classes will
follow.
llvm-svn: 13764
2004-05-25 18:44:51 +00:00
Alkis Evlogimenos
84fac6229c
Remove this file as well as it is no longer needed nor it compiles
...
llvm-svn: 13762
2004-05-25 18:24:27 +00:00
Chris Lattner
88706ea172
Implement the new cl::PositionalEatsArgs flag, refactor code a bit
...
llvm-svn: 13388
2004-05-06 22:04:31 +00:00
Brian Gaeke
2165451812
Apply simplification suggested by Chris: why assign() when operator = will do?
...
llvm-svn: 13364
2004-05-04 22:02:41 +00:00
Brian Gaeke
ba26360c7e
Add "Args" optional argument to AbstractInterpreter factory methods, which
...
fills in a ToolArgs vector in the AbstractInterpreter if it is set. This
ToolArgs vector is used to pass additional arguments to LLI and/or LLC.
This is intended to address Bug 40.
Also, make -debug-only=toolrunner work for the LLC and CBE
AbstractInterpreters.
llvm-svn: 13356
2004-05-04 21:09:01 +00:00
Chris Lattner
8f8bd7daac
Bugpoint was not correctly capturing stderr! This caused it to "find" bugs
...
that didn't exist, missing the ones that do :(
llvm-svn: 12978
2004-04-16 05:35:58 +00:00
Chris Lattner
a2ecf0cf75
lli no longer takes the -quiet option!
...
llvm-svn: 12674
2004-04-05 20:28:41 +00:00
Chris Lattner
d154cb1717
Do not mangle intrinsics in any way!
...
llvm-svn: 12673
2004-04-05 20:17:53 +00:00
Brian Gaeke
017eb9caf3
Add autoconf support for isStandardOutAConsole ().
...
llvm-svn: 12638
2004-04-02 21:26:04 +00:00
Chris Lattner
2ef79bf28a
Add new function, autoconf support required tho
...
llvm-svn: 12600
2004-04-02 05:04:03 +00:00
Chris Lattner
e78381e9f1
Add some new methods
...
llvm-svn: 12539
2004-03-30 00:20:08 +00:00
Chris Lattner
dd7ed2912e
Adjust to new itf
...
llvm-svn: 12534
2004-03-29 20:42:49 +00:00
Alkis Evlogimenos
d6bb9674d9
Hide variable from other functions.
...
llvm-svn: 12118
2004-03-04 17:50:44 +00:00
Chris Lattner
aa6f7cb4e4
Make sure that at least one virtual method is defined in a .cpp file to avoid
...
having the compiler emit RTTI and vtables to EVERY translation unit.
llvm-svn: 11871
2004-02-26 07:24:18 +00:00
Misha Brukman
642275dc4e
`cat' is usually in /bin, not /usr/bin, at least on our systems.
...
llvm-svn: 11690
2004-02-21 21:51:41 +00:00
Chris Lattner
7448a9867b
When printing a stack trace, demangle it if possible. Since we are potentially
...
in a signal handler, allocating memory or doing other unsafe things is bad,
which means we should do it in a different process.
llvm-svn: 11689
2004-02-21 21:06:19 +00:00
Brian Gaeke
688940d763
Use backtrace() and include execinfo.h, if they were detected by autoconf.
...
llvm-svn: 11658
2004-02-20 06:40:59 +00:00
Chris Lattner
0d3df27b4c
Disable the stack trace thing until we can get an autoconf test for it. This
...
call breaks on sparcs
llvm-svn: 11635
2004-02-19 21:21:23 +00:00
Chris Lattner
6deffd7154
Implement new function
...
llvm-svn: 11631
2004-02-19 20:03:14 +00:00
Alkis Evlogimenos
59c646da40
Make ToolExecutionError inherit std::exception and implement its
...
interface: getMessage() is gone, use what() instead.
llvm-svn: 11621
2004-02-19 07:39:26 +00:00
Alkis Evlogimenos
fbaf7b3944
Print stacktrace in STDERR before dying on a fatal signal. Currently
...
the symbols are not demangled.
llvm-svn: 11620
2004-02-19 07:36:35 +00:00
Chris Lattner
2a293313ca
Add support for just running the code generator
...
llvm-svn: 11611
2004-02-18 23:24:41 +00:00
Chris Lattner
5a22f3a7d1
indent correctly
...
llvm-svn: 11601
2004-02-18 20:58:00 +00:00
Chris Lattner
eddc6ab2e7
Don't yell. BUGPOINT should yell, not the tool runner :)
...
llvm-svn: 11600
2004-02-18 20:57:38 +00:00
Chris Lattner
a52c617fd7
If there is an error running a tool, include the error message (e.g. assertion failure) in the exception
...
llvm-svn: 11597
2004-02-18 20:38:00 +00:00
Chris Lattner
72ce97cc95
When an error occurs executing a tool, we now throw an exception instead
...
of calling exit(1).
llvm-svn: 11593
2004-02-18 20:21:57 +00:00
Chris Lattner
62f67310f1
The C backend is no longer in llvm-dis, it's in llc
...
llvm-svn: 11533
2004-02-17 06:40:06 +00:00
Chris Lattner
b4b7a985fc
Fix a bug in the recent rewrite of the leakdetector that caused all of the
...
nightly tests to be really messed up. The problem was that the new leakdetector
was depending on undefined behavior: the order of destruction of static objects.
llvm-svn: 11488
2004-02-15 23:33:48 +00:00
Alkis Evlogimenos
0a88b596b1
Modularize implementation of LeakDetector into a typed template
...
implementation class. This makes the code simpler and allows for more
types to be added easily. It also implements caching for generic
objects (it was only available for llvm objects).
llvm-svn: 11452
2004-02-14 23:33:39 +00:00
Chris Lattner
6c31b081e4
Fix the logic in the name mangler. If there are two symbols named 'X', and one
...
is external, make sure to mangle the *internal* one, not external one
llvm-svn: 11424
2004-02-14 00:30:23 +00:00
Chris Lattner
ceb4bfebcc
Initialize the count instance variable.
...
llvm-svn: 11305
2004-02-11 03:29:16 +00:00
John Criswell
3a994220ad
Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
...
every file.
llvm-svn: 10976
2004-01-26 20:59:41 +00:00
Chris Lattner
83e7633d7c
This file goes away
...
llvm-svn: 10905
2004-01-17 19:35:57 +00:00
Chris Lattner
2ff33e72ba
Remove use of ConstantHandling itf
...
llvm-svn: 10800
2004-01-12 20:13:04 +00:00
Chris Lattner
960a22a097
Remove config wrapper around <cerrno>
...
llvm-svn: 10747
2004-01-10 19:15:14 +00:00
Alkis Evlogimenos
ac49a51bac
Pass std::string to constructor as const reference to avoid multiple
...
copies.
llvm-svn: 10705
2004-01-06 09:16:02 +00:00
John Criswell
4a673d0bf9
Not all platforms supports sighandler_t, so I changed it to use the older
...
return value from signal() (which should be the same type; it's just not
typedef'd).
This fixes the build on Solaris.
llvm-svn: 10675
2004-01-01 15:14:28 +00:00
Chris Lattner
a00f627c1d
* Add a new helper progress method
...
* Make sure that the user sees the 100% mark
* Don't bother printing out X.0%, just print out X%
llvm-svn: 10672
2003-12-31 10:20:38 +00:00
Chris Lattner
f651ccde40
Add missing #include
...
llvm-svn: 10669
2003-12-31 07:31:10 +00:00
Chris Lattner
d6c0c685c1
Add new function
...
llvm-svn: 10664
2003-12-31 06:15:37 +00:00
Chris Lattner
ef4810619d
New class, useful for command-line interactive programs.
...
llvm-svn: 10662
2003-12-31 05:40:02 +00:00
Chris Lattner
754e73cd6c
Add new method
...
llvm-svn: 10649
2003-12-30 07:36:14 +00:00
Chris Lattner
412295aeaa
Further revisions of the FDHandle idea. In this version we use ownership
...
semantics that are the same as those used by std::auto_ptr. This allows
copying of FDHandle's, but copying transfers ownership.
llvm-svn: 10646
2003-12-30 02:45:16 +00:00
Chris Lattner
9024121340
Add trivial exception specs to produce better code since the methods cannot
...
be inlined.
llvm-svn: 10643
2003-12-29 21:43:58 +00:00
Chris Lattner
6317315a2f
Factor FDHandle out of the bytecode reader into the FileUtilities.h support
...
routines.
llvm-svn: 10642
2003-12-29 21:35:05 +00:00
Chris Lattner
2bfa334e64
implement new getToken function
...
llvm-svn: 10639
2003-12-29 05:07:02 +00:00
Chris Lattner
2fdf5e32aa
Finegrainify namespacification
...
llvm-svn: 10464
2003-12-14 21:35:53 +00:00
Chris Lattner
30ae898eb7
Finegrainify namespacification
...
Make the Timer code give correct user/system/user+system times when -track-memory is enabled
llvm-svn: 10463
2003-12-14 21:27:33 +00:00
Brian Gaeke
dba80bde3c
Lock abstraction, introduced with a view toward making the JIT thread-safe.
...
Eventually.
llvm-svn: 10284
2003-12-01 21:33:31 +00:00
Misha Brukman
87690c938c
Fix copy-pasto.
...
llvm-svn: 10197
2003-11-24 05:36:38 +00:00
Misha Brukman
c63e4ee8ad
Add ability to query if a file is a legitimate ELF shared object.
...
llvm-svn: 10193
2003-11-24 05:28:12 +00:00
Brian Gaeke
b62fb0d7ef
Only use -Wl,-R. if HAVE_LINK_R.
...
llvm-svn: 10066
2003-11-18 06:31:17 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
ba8e968641
Move IsArchive and IsBytecode here from gccld. Refactor into CheckMagic.
...
llvm-svn: 9901
2003-11-11 21:53:50 +00:00
Brian Gaeke
9384aa95cc
Add implementation of FileOpenable().
...
Refactor MakeFileExecutable() & MakeFileExecutable() into AddPermissionsBits().
llvm-svn: 9892
2003-11-11 18:27:21 +00:00
Chris Lattner
c24e1ebf3f
Attempt to provide support for those without RTLD_DEFAULT.
...
llvm-svn: 9503
2003-10-25 16:55:32 +00:00
John Criswell
71d2894956
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
9a758cd924
Add debugtype, make output marginally more nice
...
llvm-svn: 9251
2003-10-19 02:27:40 +00:00
Chris Lattner
5c98a2d33a
Fix PR #47
...
llvm-svn: 9250
2003-10-19 02:14:58 +00:00
Chris Lattner
27798b47fb
Without this option, the -run-llc mode does not work with shared objects at
...
all, making it pointless for use with the code generator debugger. With it,
it works like a charm.
llvm-svn: 9245
2003-10-18 21:54:47 +00:00
Brian Gaeke
255e770272
Fix up error message.
...
llvm-svn: 9139
2003-10-15 20:46:58 +00:00
Chris Lattner
ac95730fca
Generalize abstract interpreter interface to allow linking in an arbitrary number of shared objects
...
llvm-svn: 9129
2003-10-14 21:52:52 +00:00
Chris Lattner
1cad7eb7b0
Substantial cleanups:
...
* Add header comment
* Remove extraneous #includes
* Move the FileType enum into the GCC class
* The GCC class is not virtual.
* Move all of the "constructor" functions into the classes themselves
* Stop using cl::list as arguments, use std::vector instead (which cl::list
derives from)
* Improve comments
llvm-svn: 9121
2003-10-14 21:34:11 +00:00
Chris Lattner
187faf250c
Actually return an error if something bad happens, don't just exit.
...
llvm-svn: 9119
2003-10-14 21:07:25 +00:00
Chris Lattner
be8bc81ce0
LLI no longer has -abort-on-exception
...
llvm-svn: 9097
2003-10-13 18:26:49 +00:00
Chris Lattner
b6c8569f05
Regularize header file comments
...
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Brian Gaeke
a3f850a182
Don't include Config/stdio.h or <stdio.h>.
...
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Brian Gaeke
26333b9b39
Change to use LinkDynamicObject instead of dlopen.
...
llvm-svn: 9011
2003-10-10 17:01:49 +00:00
Brian Gaeke
254dd12289
Change to use strtoul instead of strtoll.
...
llvm-svn: 9010
2003-10-10 17:01:36 +00:00
Brian Gaeke
ec80b3028e
Add my abstracted dynamic linker support files.
...
llvm-svn: 9008
2003-10-10 16:55:42 +00:00