Commit graph

14 commits

Author SHA1 Message Date
kai
4db0123bb7 Implement FlagParser using llvm:🆑:generic_parser_base.
This approach is easier and requires less code. With some template foo
the BoolOrDefaultAdapter is not required.

This solutions applies to previous LLVM versions, too.
2015-04-25 21:47:30 +02:00
kai
c2c00d00a2 LLVM 3.7: Workaround for the FlagParser problem.
Replaces the FlagParser with llvm:🆑:parser<bool>.

If no one objects then this will be the default implementation
starting with LLVM 3.7.

TODO: The help text still has the footnote for the FlagParser options.
2015-03-15 18:09:23 +01:00
kai
ff5759d5dd LLVM 3.7: Fix implementation of FlagParser
The initialization of the parser is now split into a constructor
and the initialize() method which reqires storing a reference to
the option.
Due to some LLVM refactoring, ArgStr must be set using the setter
method.
2015-02-08 00:06:56 +01:00
Kai Nacke
0ca41ef1cd Fix LLVM 3.6 compile error.
END_WITH_NULL is now named LLVM_END_WITH_NULL.
2014-11-05 21:42:22 +01:00
Kai Nacke
fe39da53e3 Merge of 2.065.0-b3.
The new visitor class is used for IR generation. This removes some modifications from DMD source.
2014-02-10 08:47:25 +01:00
David Nadlinger
cb341586e3 First merge of 2.064 beta.
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.

Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
David Nadlinger
0a96aea868 Sort includes according to style guidelines:
1. Main include corresponding to .cpp file, if any.
 2. DMD and LDC includes.
 3. LLVM includes.
 4. System includes.

Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +01:00
David Nadlinger
9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01:00
kai
f9201e8352 Merge 1.072 2012-02-02 03:13:27 +01:00
Alexey Prokhin
0e754b5acd Merge dmd v2.055 2011-09-13 21:01:32 +04: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
Frits van Bommel
35a3d86cc6 Remove reference to llvm:🆑:AllowInverse enum value which was removed in
LLVM trunk.
2009-04-08 23:05:30 +02:00
Frits van Bommel
424bb88da0 Enable inlining by default for -O3+. 2009-03-29 19:38:59 +02:00
Frits van Bommel
b3d87205ad Use LLVM-style command line (instead of DMD-style)
Note: For a backward compatible interface, use the new bin/ldmd script. It
      supports all old options while passing on anything it doesn't recognize.

Some changes caused by this:
* -debug and -version are now -d-debug and -d-version due to a conflict with
  standard LLVM options.
* All "flag" options now allow an optional =true/=1/=false/=0 suffix.
* Some "hidden debug switches" starting with "--" were renamed because LLVM
  doesn't care about the number of dashes, so they were conflicting with other
  options (such as -c).
  The new versions start with "-hidden-debug-" instead of "--"
* --help works, but has a non-zero exit code. This breaks some Tango scripts
  which use it to test for compiler existence. See tango.patch.

Some changes not (directly) caused by this;
* (-enable/-disable)-FOO options are now available for pre- and postconditions.
* -march is used instead of -m (like other LLVM programs), but -m is an alias
  for it.
* -defaultlib, -debuglib, -d-debug and -d-version allow comma-separated values.
  The effect should be identical to specifying the same option multiple times.
  I decided against allowing these for some other options because paths might
  contain commas on some systems.
* -fPIC is removed in favor of the standard LLVM option -relocation-model=pic

Bug:
* If -run is specified as the last argument in DFLAGS, no error is generated.
  (Not very serious IMHO)
2009-02-25 17:34:51 +01:00