Commit graph

29 commits

Author SHA1 Message Date
Nicholas Wilson
6b38ad0eff
Move gen/cl_helpers.* to driver/ (#4191) 2022-09-21 19:36:24 +08:00
Martin Kinkelin
a9877cb2b7 Remove orphaned dmd/root/root.h
This file isn't part of the upstream frontend anymore.
2022-02-17 02:14:48 +01:00
Martin Kinkelin
f22304abb0 Don't allocate front-end Strings on C++ heap
If the GC is enabled (-lowmem), it must know about those Array instances,
so that the GC-allocated array of pointers and referenced GC-allocated
strings are kept alive.
2020-02-05 22:06:22 +01:00
Martin Kinkelin
1662406231 Upgrade front-end & libs to v2.088.0-beta.1 2019-08-25 00:36:15 +02:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Martin Kinkelin
32ecbdd266 Upgrade front-end & libs to v2.084.0-beta.1 2018-12-18 02:31:57 +01:00
Martin Kinkelin
4a23399236 Aim for consistent #includes (order + dir prefix)
I surely missed a few.
2018-10-20 16:19:46 +02:00
Martin Kinkelin
5c24f60cf9
Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
Martin
32b7637528 Include config file path in JSON output
Required for dmd-testsuite's compilable/json2.d.

Also fixes a bug regarding ConfigFile::path() with a null config file
path (e.g., when disabled explicitly via `-conf=`) - the
std::string(const char *) ctor segfaults for a null pointer arg,
whereas llvm::StringRef handles null pointers gracefully.
2018-03-30 23:56:42 +02:00
Johan Engelen
7e7de7a69e
Move instrumentation options into their own .h/.cpp files. (#2472) 2017-12-28 11:44:51 +01:00
David Nadlinger
9df487edff gen/ir: clang-tidy the world 2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615 driver/gen/ir: clang-format the world
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
2d959ea540 Make use of C++11 range-based for
Should be available now that support for LLVM < 3.5 has been dropped.
2015-11-01 14:49:04 +01:00
Kai Nacke
94a3995426 Merge branch 'master' into merge-2.067
Conflicts:
	driver/cl_options.cpp
2015-04-25 23:38:35 +02:00
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
95806fd7cd Merge branch 'master' into merge-2.067
Conflicts:
	runtime/druntime
2015-03-15 20:35:44 +01: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
c39c7e9c35 Update to DMD v2.067.0-b2
Includes all tagged with v2.067.0-b2. Does not includes latest druntime changes from ldc (head) branch.

This is known to be broken. I only merged the frontend stuff but did not try to compile something...
2015-02-24 22:16:17 +01:00
kai
d7ffc90d70 Fix for issue #695 2014-08-08 07:47:49 +02: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
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
Alexey Prokhin
bca73ec8b9 Merged dmd 2.059beta 2012-04-05 15:30:00 +04:00
Alexey Prokhin
0e754b5acd Merge dmd v2.055 2011-09-13 21:01:32 +04:00
David Nadlinger
7a24e12736 Cleanup: Remove unused code in backend, silence some warnings.
This removed quite some clutter that has presumably piled up because LDC is seldom built with a lot of warnings enabled due to DMDFE.
2011-04-24 12:21:33 +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
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
532cccbd3a Fixed some #includes to be correct for both D1 and D2 2009-03-08 12:13:22 +01: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