Mercurial > projects > ldc
annotate gen/llvm.h @ 1650:40bd4a0d4870
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.
author | Tomas Lindquist Olsen |
---|---|
date | Wed, 19 May 2010 12:42:32 +0200 |
parents | 61f12f4651b5 |
children |
rev | line source |
---|---|
40 | 1 #ifndef GEN_LLVM_H |
2 #define GEN_LLVM_H | |
3 | |
4 #include "llvm/Type.h" | |
5 #include "llvm/DerivedTypes.h" | |
6 #include "llvm/Constants.h" | |
7 #include "llvm/IntrinsicInst.h" | |
8 #include "llvm/CallingConv.h" | |
9 #include "llvm/GlobalVariable.h" | |
10 #include "llvm/Function.h" | |
11 #include "llvm/Module.h" | |
43 | 12 #include "llvm/Value.h" |
632
df196c8dea26
Updated to latest LLVM trunk, function notes have been removed and merged with parameter attributes, which have been renamed to just attributes. Nothing seems to have broke!
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
629
diff
changeset
|
13 #include "llvm/Attributes.h" |
40 | 14 |
15 #include "llvm/Target/TargetData.h" | |
16 | |
946
1714836f2c0b
Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
Christian Kamm <kamm incasoftware de>
parents:
653
diff
changeset
|
17 #include "llvm/Analysis/DebugInfo.h" |
1714836f2c0b
Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
Christian Kamm <kamm incasoftware de>
parents:
653
diff
changeset
|
18 |
1013
8c73ff5f69e0
Use llvm::CallSite instead of custom CallOrInvoke class.
Frits van Bommel <fvbommel wxs.nl>
parents:
946
diff
changeset
|
19 #include "llvm/Support/CallSite.h" |
8c73ff5f69e0
Use llvm::CallSite instead of custom CallOrInvoke class.
Frits van Bommel <fvbommel wxs.nl>
parents:
946
diff
changeset
|
20 |
205
9d44ec83acd1
[svn r221] Update: Switched to the 2.3 LLVM svn branch, http://llvm.org/svn/llvm-project/llvm/branches/release_23 .
lindquist
parents:
43
diff
changeset
|
21 #include "llvm/Support/IRBuilder.h" |
9d44ec83acd1
[svn r221] Update: Switched to the 2.3 LLVM svn branch, http://llvm.org/svn/llvm-project/llvm/branches/release_23 .
lindquist
parents:
43
diff
changeset
|
22 using llvm::IRBuilder; |
40 | 23 |
629
607b6b5819a7
Fixed issue with IsExpression and potential type mismatch for classes.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
445
diff
changeset
|
24 // for WriteTypeSymbolic |
607b6b5819a7
Fixed issue with IsExpression and potential type mismatch for classes.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
445
diff
changeset
|
25 #include "llvm/Assembly/Writer.h" |
607b6b5819a7
Fixed issue with IsExpression and potential type mismatch for classes.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
445
diff
changeset
|
26 |
213
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
205
diff
changeset
|
27 #define GET_INTRINSIC_DECL(_X) (llvm::Intrinsic::getDeclaration(gIR->module, llvm::Intrinsic:: _X )) |
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
205
diff
changeset
|
28 |
244
a95056b3c996
[svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
213
diff
changeset
|
29 // shortcuts for the common llvm types |
a95056b3c996
[svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
213
diff
changeset
|
30 |
309 | 31 #define LLType llvm::Type |
32 #define LLFunctionType llvm::FunctionType | |
33 #define LLPointerType llvm::PointerType | |
34 #define LLStructType llvm::StructType | |
35 #define LLArrayType llvm::ArrayType | |
36 #define LLIntegerType llvm::IntegerType | |
37 #define LLOpaqueType llvm::OpaqueType | |
244
a95056b3c996
[svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
213
diff
changeset
|
38 |
309 | 39 #define LLValue llvm::Value |
40 #define LLGlobalValue llvm::GlobalValue | |
41 #define LLGlobalVariable llvm::GlobalVariable | |
42 #define LLFunction llvm::Function | |
244
a95056b3c996
[svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
213
diff
changeset
|
43 |
309 | 44 #define LLConstant llvm::Constant |
45 #define LLConstantStruct llvm::ConstantStruct | |
46 #define LLConstantArray llvm::ConstantArray | |
47 #define LLConstantInt llvm::ConstantInt | |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
309
diff
changeset
|
48 #define LLConstantFP llvm::ConstantFP |
244
a95056b3c996
[svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
213
diff
changeset
|
49 |
309 | 50 #define LLPATypeHolder llvm::PATypeHolder |
213
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
205
diff
changeset
|
51 |
1013
8c73ff5f69e0
Use llvm::CallSite instead of custom CallOrInvoke class.
Frits van Bommel <fvbommel wxs.nl>
parents:
946
diff
changeset
|
52 #define LLCallSite llvm::CallSite |
8c73ff5f69e0
Use llvm::CallSite instead of custom CallOrInvoke class.
Frits van Bommel <fvbommel wxs.nl>
parents:
946
diff
changeset
|
53 |
213
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
205
diff
changeset
|
54 #define LLSmallVector llvm::SmallVector |
7816aafeea3c
[svn r229] Updated the object.d implementation to the latest Tango.
lindquist
parents:
205
diff
changeset
|
55 |
653
5812d6fac0f0
Fix x86_fp80 constants.
Christian Kamm <kamm incasoftware de>
parents:
632
diff
changeset
|
56 using llvm::APFloat; |
5812d6fac0f0
Fix x86_fp80 constants.
Christian Kamm <kamm incasoftware de>
parents:
632
diff
changeset
|
57 using llvm::APInt; |
445
cc40db549aea
Changed the handling of variadic intrinsics a bit.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
309
diff
changeset
|
58 |
40 | 59 #endif // GEN_LLVM_H |