kai
c28c7fb134
Introduce a debug info builder.
...
Moves all code from todebug into a new class.
Also caches the compilation unit in order to fix a LLVM 3.4 compile error.
2013-07-29 00:04:08 +02:00
David Nadlinger
acd508945a
Allow multiple declarations to share the same mangled name/LLVM global.
...
This is necessary to enable aliasing compiler-generated
symbols with pragma(mangle, …).
Note that globals for internal use are still directly
created.
2013-06-16 00:28:02 +02:00
David Nadlinger
2cebe6408c
Divided ir/irtypestruct.* in general aggregate and struct specific part.
...
This is just to improve clarity, as it was rather non-obvious
what of the code also applied to classes before.
IrTypeAggr::createInitializerConstant would currently belong in
IrTypeStruct, but this will be refactored anyway.
2013-06-12 17:17:09 +02:00
David Nadlinger
848dee32d4
Store bools as i8.
...
I really hope we can refactor this to use a less leaky
abstraction later – it should at least be possible to merge
voidToI8 and i1ToI8.
2013-06-07 03:20:54 +02:00
David Nadlinger
eef05ba019
Do not try to guess exact initializer type.
...
This might have been required with the old (pre-3.0) LLVM
type system, but the module linker handles global type
resolution just fine now.
Also, it is virtually impossible to determine the type in
advance for some cases, e.g. an array of unions with an
initializer that contains pointers to the array itself.
2013-05-19 20:25:11 +02:00
David Nadlinger
f8f405000b
Avoid confusing naming convention.
...
We generally do not really use underscore prefixes. But if
they are used in other codebases, they typically refer to
member variables.
2013-05-18 19:51:37 +02:00
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +01:00
David Nadlinger
d2f8c929d0
MinGW: pragma(lib,...) DMD compatibility hacks.
2013-02-26 13:14:32 +01:00
David Nadlinger
1a132d5d41
Integrate obj_includelib into its only caller.
2013-02-26 00:20:45 +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
8ff3a8060a
Use llvm_unreachable instead of assert(0).
...
Also removed some unused functions.
2013-02-07 03:38:15 +01:00
David Nadlinger
59a4a02e49
Cleanup: Avoid signed/unsigned comparisons.
...
The ones ones left are for DMD-defined constants.
2012-12-20 01:21:09 +01:00
David Nadlinger
1bb14c45d2
Removed trailing whitespace.
2012-12-16 17:19:15 +01:00
David Nadlinger
9458911839
Added LLVM-style license headers to all our files.
2012-12-16 17:19:14 +01:00
David Nadlinger
bb24f9bafe
Log messages: Fixed references to "toObjFile()".
2012-10-06 19:32:42 +02:00
David Nadlinger
5f6447e52c
Fix GitHub issue #168 – alignment of globals.
2012-09-28 01:57:21 +02:00
kai
2dbee75523
Prefer C++-style casts.
...
This is based on Item 2 of "More Effective C++". In general, the C++ cast operators are more expressive and easy to find,
e.g. by grep. Using const_cast also shuts up some compiler warnings.
2012-08-02 19:55:29 +02:00
kai
dbb5a34eda
Add changes for LLVM 3.2.
2012-07-29 17:31:50 +02:00
Alexey Prokhin
bb0d51fb98
Don't resolve template instances that were instantiated inside static if or statis assert
2012-02-15 13:23:23 +04:00
Alexey Prokhin
adebe4c732
DMD Issue 4269 - Regression(2.031): invalid type accepted if evaluated while errors are gagged
2012-02-15 13:23:23 +04:00
Alexey Prokhin
859ae8481f
That was committed by mistake
2011-12-06 14:43:05 +04:00
Alexey Prokhin
8b50928636
Fixed #37 — ICE: llvm::GlobalVariable::setInitializer assert failed
2011-12-06 13:55:01 +04:00
Alexey Prokhin
91f4e5d015
Added emission of dwarf lexical blocks.
...
Also, dropped support for DISABLE_DEBUG_INFO definition.
2011-12-04 15:34:35 +04:00
Alexey Prokhin
014d6bdd4d
Merged 2.056
2011-12-02 21:50:52 +04:00
kai
a5b3dd29b5
Fixes 2 kinds of warnings.
...
1) The last parameter of getGetElementPtr() has type bool. In some instances, a 2 is used as parameter. This is converted to true.
2) Several loops use int instead of unsigned. This causes warning about signed/unsigned mismatch.
Curiously, only Visual C++ complains about this. Nevertheless I think that the warnings should be fixed.
2011-11-23 19:01:04 +01:00
Alexey Prokhin
b52c224d57
Merge v2.056
2011-11-01 11:44:03 +04:00
Alexey Prokhin
7431d58702
Rewritten initialization of global variables.
2011-10-25 15:43:49 +04:00
Alexey Prokhin
629f13929e
WIP: port to llvm 3.0
2011-10-25 15:43:39 +04:00
Alexey Prokhin
bb2676dbe3
Fix unresolved symbol in the runnable/mixin2 test
2011-07-19 10:14:14 +04:00
Alexey Prokhin
6ba2e41b49
Do not resolve forward referenced structs, classes and interfaces
2010-12-30 14:04:24 +03:00
Alexey Prokhin
e4c3179d43
Different fixes: phobos compiles now
2010-10-28 14:53:01 +04:00
Alexey Prokhin
4d7a6eda23
Different fixes for d2
2010-10-07 22:35:32 +04:00
Christian Kamm
756a2cb2a1
Adjust LDC to work with the LLVMContext LLVM changes.
...
This means we now require a fairly new LLVM revision. I use 75234.
2009-07-10 21:30:02 +02:00
Robert Clipsham
f13c5e82f5
Added a stripModifiers() function to remove shared|const|immutable storage classes in D2 (should eventually be moved to a dhelpers file rather than llvm helpers).
...
Replaced a few occurances of STCinvariant with STCimmutable.
2009-06-18 15:44:04 +01:00
Tomas Lindquist Olsen
62e8384da0
Set explicit alignment for normal global variables, ensures alignment is correct for globals with union type.
2009-05-15 17:17:20 +02:00
Tomas Lindquist Olsen
37cf5a5789
Added Doxygen file.
...
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
2009-04-15 20:06:25 +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
ec986231e5
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
2009-03-27 21:50:32 +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