Commit graph

58 commits

Author SHA1 Message Date
Moritz Warning
fd4899f46f remove revisions.pl; we go with llvm releases now 2010-10-23 14:10:25 +02:00
Moritz Warning
233299e5c8 Haiku OS support; thanks to MrSunshine 2010-10-04 00:58:14 +02:00
Moritz Warning
09b9644292 see #428 :: make identifiers unique for modules without module statement that are passed on command line; thanks SiegeLord 2010-09-27 00:01:47 +02:00
Tomas Lindquist Olsen
1fac40d2bd Update to work with LLVM 2.7.
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).

Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.

Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
2010-05-19 12:42:32 +02:00
Matti Niemenmaa
7edb3d1875 Don't error out with -singleobj, -of, and -c/-output-{bc,ll,o,s}. 2010-03-09 23:20:39 +02:00
Matti Niemenmaa
68daadf53c Add -linkonce-templates for emitting linkonce_odr syms instead of weak_odr. 2010-03-09 23:07:08 +02:00
Matti Niemenmaa
b0271794cd Make -nodefaultlib override -de{fault,bug}lib=foo instead of vice versa. 2010-03-05 21:40:51 +02:00
Christian Kamm
3479e91996 Merge DMD 1.051 2009-11-06 23:58:01 +01:00
Christian Kamm
64a8e47ad6 Fix several 'reaches end of function' warnings by making fatal noreturn.
The warnings also pointed out a few genuine bugs. Replace some tabs with
spaces.
2009-11-06 21:51:41 +01:00
Benjamin Kramer
8b6f11938a Kill off StripMetaData. 2009-08-25 21:35:43 +02:00
Benjamin Kramer
f3aad137c5 Remove dummy module hack. 2009-08-06 16:02:14 +02:00
Benjamin Kramer
977fa551ee Push the context through StructType::get.
Requires LLVM >= 78258. Also remove old #if's.
2009-08-06 01:47:39 +02:00
Benjamin Kramer
e05d3d8c3a lookupTarget no longer takes a Module.
And we need to get TargetData from the module if the Target
doesn't have it.
2009-08-04 12:21:59 +02:00
Benjamin Kramer
5b84e64f6c Build fix for TargetMachine changes.
#if'ed for now.
2009-08-03 11:29:35 +02:00
Tomas Lindquist Olsen
d5d3ecdb05 Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake. 2009-07-31 11:28:31 +02:00
Benjamin Kramer
a31f3eb98f getClosestStaticTargetForModule was replaced with lookupTarget
Build fix for LLVM r77111.
2009-07-28 15:26:21 +02:00
Benjamin Kramer
69171c07cd Temporarily force our LLVMContext to the global context
From llvm r75846:
"To simplify the upcoming context-on-type change, switch all command
line tools to using the default global context for now."
2009-07-20 17:55:05 +02:00
Benjamin Kramer
ac5bd294ca We need to parse mArch ourselves now
Build fix for LLVM r75890
2009-07-17 19:23:20 +02:00
Benjamin Kramer
7359448063 Use TargetRegistry instead of TargetMachineRegistry for Target lookups
This fixes the build for LLVM >= r75774 and will probably break older
LLVM revs.
2009-07-15 23:01:51 +02:00
Benjamin Kramer
0ee2f34611 Don't use llvm::getGlobalContext() anymore 2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1 Build fix for the latest LLVMContext changes (LLVM r75445)
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Benjamin Kramer
8576788245 Get rid of USE_METADATA 2009-07-11 14:19:21 +02:00
Benjamin Kramer
45f7401a5b Remove all of the now unecessary #if LLVM_REV 2009-07-11 14:09:33 +02:00
Robert Clipsham
4fbcd9b9c4 A couple of ldc2 tweaks now druntime compiles. 2009-07-09 12:36:08 +01:00
Robert Clipsham
951e961f9e Merge. 2009-07-06 23:56:11 +01:00
Robert Clipsham
1812c5b00a Fixed some unmerged parts of the D2 frontend.
Removed the automatic linker flags for D2 (temp).
Renamed a runtime function for D2.
2009-07-06 23:54:02 +01:00
Benjamin Kramer
22b36384b0 Fix build for LLVM >= r74640
Some LLVM objects now take a 'Context' to make multi-threaded apps easier.
Since we're not multi-threaded it's safe to use llvm::getGlobalContext()
which gives us the same behavior as we had before.
2009-07-03 17:24:35 +02:00
Christian Kamm
88f6e9e83a Initialize LLVM target and asmprinter for the native and extra targets.
Uses some CMake hackery to get the native LLVM target name, since it only
provides a conveniance function for initializing the native target and not the
native asmprinter.
2009-06-26 21:02:23 +02:00
Frits van Bommel
f76870f255 Print the path to the configuration file being used if -v is passed. 2009-06-07 17:20:55 +02:00
Frits van Bommel
96fdcd6347 Run semantic3 on imported modules, and emit new symbols with
`available_externally` linkage. This allows the inliner to inline functions from
other modules while telling the code generator to ignore those functions (treat
them as declarations)
Still generates a few extra `TypeInfo`s and strings...
Disabled when generating debug info because I don't really understand it, and it
doesn't like this.
2009-06-07 16:00:13 +02:00
Tomas Lindquist Olsen
f6997cb604 D2:
Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct.

Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d .

Disabled (#if 0) some potentally very large type dumps for -vv .

Updated classinfo and typeinfo generation for D2, almost complete now.

Added finer grained checks for vtbl type mismatching, aids debugging.
2009-06-03 02:28:48 +02:00
Christian Kamm
a05ed9a171 Fix #309: allow -of with multiple source files if -singleobj is given. 2009-05-30 12:58:04 +02:00
Frits van Bommel
1791d7b8b4 Fix a behavioral change accidentally introduced by the move to the LLVM
commandline system: `-output-(bc|ll|s)` used to disable generation of an object
file unless explicitly requested with `-output-o`. Now they do so again.
2009-05-23 20:57:22 +02:00
Christian Kamm
f675d36cfb Tentative fix for semantic3 on imported modules and unnecessary template
function definition issue. Please test!
Also change linkage of __interfaceInfos to external (same as __Class, __vtbl,
__init). The other change might make this superfluous.
2009-05-21 10:56:04 +02:00
Christian Kamm
8e56fe69a4 Merged xfBuild patch for dependency tree generation. See #286. 2009-05-20 21:13:41 +02:00
Frits van Bommel
827880e467 Don't try to strip metadata if we don't generate any 2009-05-17 22:40:02 +02:00
Tomas Lindquist Olsen
e2ba08388f Added new FreeBSD and Solaris predefined version identifiers. 2009-05-17 17:10:26 +02:00
Frits van Bommel
76ae0b0ab6 Fix format-string bugs by adding __attribute__((__format__)) in all applicable
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
2009-05-17 00:15:25 +02:00
Frits van Bommel
35d62be334 Remove some other code that tested for LLVM before r67588. 2009-05-12 16:02:51 +02:00
Christian Kamm
883f13dbce Strip metadata for -singleobj as a workaround to a LLVM linking bug. 2009-05-09 18:57:21 +02:00
Frits van Bommel
f5b56ce346 Fix typo in function name 2009-05-07 15:33:06 +02:00
Frits van Bommel
83dda319ae Add #include "gen/llvm-version.h" to files that use the macro it defines... 2009-04-24 16:47:42 +02:00
Christian Kamm
2347526ca8 Disable frame pointer elimination when -g or -gc is passed. 2009-04-08 21:12:08 +02:00
Christian Kamm
ba200214d4 Make sure -run doesn't consume the config file flags. 2009-04-05 15:58:28 +02:00
Frits van Bommel
ff72b1f640 Make sure -defaultlib and -debuglib don't get cut off if longer than 63 chars,
and clean up some overly verbose code.
2009-04-01 00:52:31 +02:00
Frits van Bommel
e129494812 Allow specific optimization passes to be requested from the command line.
Now you can run "`ldc test.d -c -mem2reg -simplifycfg`" if you feel the urge.
The -O<N> options are still supported, and are inserted in the passes list in
the position where they appear on the command line.
(so -simplifycfg -O1 -instcombine does the "right thing")

One small change: -inline is renamed to -enable-inlining due to a naming
conflict with the option to add the -inline pass. -inline now inserts the
inlining pass in the position specified, not in the middle of -O<N>.
(ldmd has been updated to translate -inline to -enable-inlining)
2009-03-29 15:46:55 +02:00
Tomas Lindquist Olsen
be3bfbff5d Fixed problems introduced by previous commits that prevented Tango from compiling. 2009-03-27 23:17:04 +01:00
Tomas Lindquist Olsen
daef67acc3 Changed use of toObjFile to a new codegen method.
More versioning of DMD specific codegen code.
2009-03-27 17:54:27 +01:00
Tomas Lindquist Olsen
8b751cce0e - Updated to DMD frontend 1.041.
- Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
2009-03-12 20:37:27 +01:00
Frits van Bommel
c1d9694494 Work around llvm bug #3749 better, or not at all if using a fixed llvm revision. 2009-03-09 13:29:25 +01:00