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.
This commit is contained in:
David Nadlinger 2013-02-07 19:36:29 +01:00
parent 5616753768
commit 0a96aea868
80 changed files with 550 additions and 614 deletions

View file

@ -9,7 +9,8 @@
#include "driver/cl_options.h"
#include "gen/cl_helpers.h"
#include "gen/logger.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetMachine.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/DataLayout.h"
@ -19,10 +20,6 @@
#include "llvm/Target/TargetData.h"
#endif
#include "gen/logger.h"
#include "llvm/Support/CommandLine.h"
namespace opts {
// Positional options first, in order:

View file

@ -12,17 +12,15 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_CL_OPTIONS_H
#define LDC_CL_OPTIONS_H
#ifndef LDC_DRIVER_CL_OPTIONS_H
#define LDC_DRIVER_CL_OPTIONS_H
#include "mars.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
#include <deque>
#include <vector>
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/CodeGen.h"
namespace opts {
namespace cl = llvm::cl;

View file

@ -7,19 +7,15 @@
//
//===----------------------------------------------------------------------===//
#include <iostream>
#include <string>
#include <cassert>
#include <cstring>
#include "driver/configfile.h"
#include "mars.h"
#include "libconfig.h++"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "libconfig.h++"
#include "driver/configfile.h"
#include "mars.h"
#include <cassert>
#include <cstring>
#include <iostream>
#include <string>
namespace sys = llvm::sys;

View file

@ -11,11 +11,13 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_CONF_CONFIGFILE_H
#define LDC_CONF_CONFIGFILE_H
#ifndef LDC_DRIVER_CONFIGFILE_H
#define LDC_DRIVER_CONFIGFILE_H
#include <vector>
#include <string>
#include <vector>
namespace llvm { namespace sys { class Path; } }
namespace libconfig
{
@ -48,4 +50,4 @@ private:
s_vector switches;
};
#endif // LDC_CONF_CONFIGFILE_H
#endif // LDC_DRIVER_CONFIGFILE_H

View file

@ -48,6 +48,10 @@
# error "Please define LDC_EXE_NAME to the name of the LDC executable to use."
#endif
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/SystemUtils.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cerrno>
#include <climits>
@ -56,10 +60,6 @@
#include <cstdlib>
#include <numeric>
#include <vector>
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/SystemUtils.h"
#include "llvm/Support/raw_ostream.h"
#ifdef HAVE_SC_ARG_MAX
# include <unistd.h>

View file

@ -7,26 +7,23 @@
//
//===----------------------------------------------------------------------===//
#include "driver/linker.h"
#include "mars.h"
#include "module.h"
#include "root.h"
#include "driver/cl_options.h"
#include "gen/llvm.h"
#include "llvm/Linker.h"
#include "gen/logger.h"
#include "gen/optimizer.h"
#include "gen/programs.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Linker.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Program.h"
#if _WIN32
#include "llvm/Support/SystemUtils.h"
#endif
#include "root.h"
#include "mars.h"
#include "module.h"
#include "gen/logger.h"
#include "gen/optimizer.h"
#include "gen/programs.h"
#include "driver/linker.h"
#include "driver/cl_options.h"
//////////////////////////////////////////////////////////////////////////////
// Is this useful?

View file

@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_GEN_LINKER_H
#define LDC_GEN_LINKER_H
#ifndef LDC_DRIVER_LINKER_H
#define LDC_DRIVER_LINKER_H
#include "llvm/Support/CommandLine.h"
#include <vector>
@ -55,4 +55,4 @@ void deleteExecutable();
*/
int runExecutable();
#endif // LDC_GEN_LINKER_H
#endif // LDC_DRIVER_LINKER_H

View file

@ -7,9 +7,33 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvmcompat.h"
#include "id.h"
#include "json.h"
#include "mars.h"
#include "module.h"
#include "mtype.h"
#include "rmem.h"
#include "root.h"
#include "driver/cl_options.h"
#include "driver/configfile.h"
#include "driver/linker.h"
#include "driver/toobj.h"
#include "gen/cl_helpers.h"
#include "gen/irstate.h"
#include "gen/linkage.h"
#include "gen/llvm.h"
#include "gen/llvmcompat.h"
#include "gen/logger.h"
#include "gen/metadata.h"
#include "gen/optimizer.h"
#include "gen/passes/Passes.h"
#include "llvm/Linker.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#if LDC_LLVM_VER >= 303
#include "llvm/LinkAllIR.h"
#include "llvm/IR/LLVMContext.h"
@ -17,54 +41,26 @@
#include "llvm/LinkAllVMCore.h"
#include "llvm/LLVMContext.h"
#endif
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/Host.h"
#include "llvm/MC/SubtargetFeature.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include "rmem.h"
#include "root.h"
#include <stdio.h>
#include <stdlib.h>
#if POSIX
#include <errno.h>
#elif _WIN32
#include <windows.h>
#endif
// stricmp
#if __GNUC__ && !_WIN32
#include "gnuc.h"
#endif
#include "mars.h"
#include "module.h"
#include "mtype.h"
#include "id.h"
// Needs Type already declared.
#include "cond.h"
#include "json.h"
#include "gen/logger.h"
#include "gen/linkage.h"
#include "gen/irstate.h"
#include "gen/optimizer.h"
#include "gen/metadata.h"
#include "gen/passes/Passes.h"
#include "driver/linker.h"
#include "driver/cl_options.h"
#include "gen/cl_helpers.h"
using namespace opts;
#include "driver/configfile.h"
#include "driver/toobj.h"
#if POSIX
#include <errno.h>
#elif _WIN32
#include <windows.h>
#endif
extern void getenv_setargv(const char *envvar, int *pargc, char** *pargv);
extern void backend_init();
extern void backend_term();

View file

@ -7,26 +7,24 @@
//
//===----------------------------------------------------------------------===//
#include <cstddef>
#include <fstream>
#include "driver/toobj.h"
#include "gen/irstate.h"
#include "gen/logger.h"
#include "gen/optimizer.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/PassManager.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Program.h"
#include "llvm/Target/TargetMachine.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/Module.h"
#else
#include "llvm/Module.h"
#endif
#include "llvm/PassManager.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Target/TargetMachine.h"
#include "gen/irstate.h"
#include "gen/logger.h"
#include "gen/optimizer.h"
#include <cstddef>
#include <fstream>
// fwd decl
void emit_file(llvm::TargetMachine &Target, llvm::Module& m, llvm::raw_fd_ostream& Out,

View file

@ -11,8 +11,12 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_GEN_TOOBJ_H
#define LDC_GEN_TOOBJ_H
#ifndef LDC_DRIVER_TOOBJ_H
#define LDC_DRIVER_TOOBJ_H
#include <string>
namespace llvm { class Module; }
void writeModule(llvm::Module* m, std::string filename);

View file

@ -7,20 +7,18 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "mtype.h"
#include "module.h"
#include "declaration.h"
#include "aggregate.h"
#include "gen/aa.h"
#include "gen/runtime.h"
#include "gen/tollvm.h"
#include "aggregate.h"
#include "declaration.h"
#include "module.h"
#include "mtype.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/irstate.h"
#include "gen/dvalue.h"
#include "gen/runtime.h"
#include "gen/tollvm.h"
#include "ir/irmodule.h"
#if DMDV2

View file

@ -11,13 +11,20 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_GEN_AA_H
#define LDC_GEN_AA_H
#include "lexer.h"
enum TOK;
struct DValue;
struct Loc;
struct Type;
namespace llvm { class Value; }
DValue* DtoAAIndex(Loc& loc, Type* type, DValue* aa, DValue* key, bool lvalue);
DValue* DtoAAIn(Loc& loc, Type* type, DValue* aa, DValue* key);
DValue* DtoAARemove(Loc& loc, DValue* aa, DValue* key);
LLValue* DtoAAEquals(Loc& loc, TOK op, DValue* l, DValue* r);
llvm::Value* DtoAAEquals(Loc& loc, TOK op, DValue* l, DValue* r);
#endif // LDC_GEN_AA_H

View file

@ -11,12 +11,15 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_GEN_ABI_GENERIC
#define LDC_GEN_ABI_GENERIC
#ifndef LDC_GEN_ABI_GENERIC_H
#define LDC_GEN_ABI_GENERIC_H
#include "gen/abi.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/tollvm.h"
#include "gen/logger.h"
#include "gen/structs.h"
#include "gen/tollvm.h"
/// Removes padding fields for (non-union-containing!) structs
struct RemoveStructPadding : ABIRewrite {

View file

@ -12,11 +12,12 @@
//
//===----------------------------------------------------------------------===//
#include "gen/abi-ppc64.h"
#include "gen/abi.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/tollvm.h"
struct PPC64TargetABI : TargetABI {

View file

@ -11,13 +11,11 @@
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_GEN_ABI_PPC64_H__
#define __LDC_GEN_ABI_PPC64_H__
#include "gen/abi.h"
#ifndef LDC_GEN_ABI_PPC64_H
#define LDC_GEN_ABI_PPC64_H
struct TargetABI;
TargetABI* getPPC64TargetABI();
#endif

View file

@ -43,21 +43,20 @@
//
//===----------------------------------------------------------------------===//
#include "mtype.h"
#include "declaration.h"
#include "gen/abi-x86-64.h"
#include "aggregate.h"
#include "declaration.h"
#include "mtype.h"
#include "gen/abi-generic.h"
#include "gen/abi-x86-64.h"
#include "gen/abi.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/tollvm.h"
#include "gen/logger.h"
#include "gen/dvalue.h"
#include "gen/llvmhelpers.h"
#include "gen/abi.h"
#include "gen/abi-x86-64.h"
#include "gen/abi-generic.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "ir/irfunction.h"
#include <cassert>
#include <map>
#include <string>

View file

@ -11,13 +11,11 @@
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_GEN_ABI_X86_64_H__
#define __LDC_GEN_ABI_X86_64_H__
#include "gen/abi.h"
#ifndef LDC_GEN_ABI_X86_64_H
#define LDC_GEN_ABI_X86_64_H
struct TargetABI;
TargetABI* getX86_64TargetABI();
#endif

View file

@ -8,16 +8,14 @@
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "mars.h"
#include "gen/abi-generic.h"
#include "gen/abi.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/tollvm.h"
#include "gen/abi.h"
#include "gen/logger.h"
#include "gen/dvalue.h"
#include "gen/abi-generic.h"
#include "gen/tollvm.h"
#include "ir/irfunction.h"
#include "ir/irfuncty.h"

View file

@ -11,11 +11,10 @@
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_GEN_ABI_X86_H__
#define __LDC_GEN_ABI_X86_H__
#include "gen/abi.h"
#ifndef LDC_GEN_ABI_X86_H
#define LDC_GEN_ABI_X86_H
struct TargetABI;
TargetABI* getX86TargetABI();
#endif

View file

@ -7,24 +7,21 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include <algorithm>
#include "mars.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/tollvm.h"
#include "gen/abi.h"
#include "gen/logger.h"
#include "gen/dvalue.h"
#include "mars.h"
#include "gen/abi-generic.h"
#include "gen/abi-ppc64.h"
#include "gen/abi-x86.h"
#include "gen/abi-x86-64.h"
#include "gen/abi-x86.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "ir/irfunction.h"
#include "ir/irfuncty.h"
#include <algorithm>
//////////////////////////////////////////////////////////////////////////////

View file

@ -14,8 +14,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_GEN_ABI_H__
#define __LDC_GEN_ABI_H__
#ifndef LDC_GEN_ABI_H
#define LDC_GEN_ABI_H
#include <vector>

View file

@ -7,22 +7,20 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "mtype.h"
#include "module.h"
#include "dsymbol.h"
#include "gen/arrays.h"
#include "aggregate.h"
#include "declaration.h"
#include "dsymbol.h"
#include "init.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/arrays.h"
#include "gen/runtime.h"
#include "gen/logger.h"
#include "module.h"
#include "mtype.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/runtime.h"
#include "gen/tollvm.h"
#include "ir/irmodule.h"
#include "ir/irtypestruct.h"

View file

@ -11,12 +11,18 @@
//
//===----------------------------------------------------------------------===//
#ifndef LLVMC_GEN_ARRAYS_H
#define LLVMC_GEN_ARRAYS_H
#ifndef LDC_GEN_ARRAYS_H
#define LDC_GEN_ARRAYS_H
#include "lexer.h"
#include "gen/llvm.h"
struct ArrayInitializer;
struct DSliceValue;
struct DValue;
struct Expression;
struct Loc;
struct Type;
llvm::StructType* DtoArrayType(Type* arrayTy);
llvm::StructType* DtoArrayType(LLType* elemTy);
@ -69,4 +75,4 @@ DValue* DtoCastArray(Loc& loc, DValue* val, Type* to);
// generates an array bounds check
void DtoArrayBoundsCheck(Loc& loc, DValue* arr, DValue* index, DValue* lowerBound = 0);
#endif // LLVMC_GEN_ARRAYS_H
#endif // LDC_GEN_ARRAYS_H

View file

@ -8,15 +8,13 @@
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "declaration.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/dvalue.h"
#include "gen/logger.h"
#include "gen/complex.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
//////////////////////////////////////////////////////////////////////////////

View file

@ -8,15 +8,13 @@
//===----------------------------------------------------------------------===//
#include "gen/cl_helpers.h"
#include "mars.h"
#include "root.h"
#include "rmem.h"
#include <cctype> // isupper, tolower
#include "root.h"
#include <algorithm>
#include <utility>
#include <cctype> // isupper, tolower
#include <stdarg.h>
#include <utility>
namespace opts {

View file

@ -12,13 +12,12 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_CL_HELPERS_H
#define LDC_CL_HELPERS_H
#include <string>
#ifndef LDC_GEN_CL_HELPERS_H
#define LDC_GEN_CL_HELPERS_H
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include <string>
template <typename TYPE> struct ArrayBase;
typedef ArrayBase<char> Strings;

View file

@ -8,18 +8,15 @@
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "mtype.h"
#include "aggregate.h"
#include "init.h"
#include "declaration.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "init.h"
#include "mtype.h"
#include "gen/arrays.h"
#include "gen/classes.h"
#include "gen/dvalue.h"
#include "gen/functions.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/nested.h"
@ -28,7 +25,6 @@
#include "gen/structs.h"
#include "gen/tollvm.h"
#include "gen/utils.h"
#include "ir/irstruct.h"
#include "ir/irtypeclass.h"

View file

@ -17,6 +17,12 @@
#include "gen/structs.h"
struct ClassDeclaration;
struct CtorDeclaration;
struct FuncDeclaration;
struct NewExp;
struct TypeClass;
/// Resolves the llvm type for a class declaration
void DtoResolveClass(ClassDeclaration* cd);
@ -31,12 +37,12 @@ void DtoDefineClass(ClassDeclaration* cd);
/// Builds the initializer of cd's ClassInfo.
/// FIXME: this should be put into IrStruct and eventually IrClass.
LLConstant* DtoDefineClassInfo(ClassDeclaration* cd);
llvm::Constant* DtoDefineClassInfo(ClassDeclaration* cd);
DValue* DtoNewClass(Loc loc, TypeClass* type, NewExp* newexp);
void DtoInitClass(TypeClass* tc, LLValue* dst);
DValue* DtoCallClassCtor(TypeClass* type, CtorDeclaration* ctor, Array* arguments, LLValue* mem);
void DtoFinalizeClass(LLValue* inst);
void DtoInitClass(TypeClass* tc, llvm::Value* dst);
DValue* DtoCallClassCtor(TypeClass* type, CtorDeclaration* ctor, Array* arguments, llvm::Value* mem);
void DtoFinalizeClass(llvm::Value* inst);
DValue* DtoCastClass(DValue* val, Type* to);
DValue* DtoDynamicCastObject(DValue* val, Type* to);
@ -44,8 +50,8 @@ DValue* DtoDynamicCastObject(DValue* val, Type* to);
DValue* DtoCastInterfaceToObject(DValue* val, Type* to);
DValue* DtoDynamicCastInterface(DValue* val, Type* to);
LLValue* DtoIndexClass(LLValue* src, ClassDeclaration* sd, VarDeclaration* vd);
llvm::Value* DtoIndexClass(llvm::Value* src, ClassDeclaration* sd, VarDeclaration* vd);
LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl, char* name);
llvm::Value* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl, char* name);
#endif

View file

@ -7,17 +7,15 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "mtype.h"
#include "declaration.h"
#include "gen/complex.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/irstate.h"
#include "declaration.h"
#include "mtype.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
//////////////////////////////////////////////////////////////////////////////////////////

View file

@ -14,19 +14,33 @@
#ifndef LDC_GEN_COMPLEX_H
#define LDC_GEN_COMPLEX_H
#include "lexer.h"
#include "longdouble.h"
struct DValue;
struct Loc;
struct Type;
namespace llvm
{
class Constant;
class StructType;
class Type;
class Value;
}
llvm::StructType* DtoComplexType(Type* t);
LLType* DtoComplexBaseType(Type* t);
llvm::Type* DtoComplexBaseType(Type* t);
LLConstant* DtoConstComplex(Type* t, longdouble re, longdouble im);
llvm::Constant* DtoConstComplex(Type* t, longdouble re, longdouble im);
LLConstant* DtoComplexShuffleMask(unsigned a, unsigned b);
llvm::Constant* DtoComplexShuffleMask(unsigned a, unsigned b);
DValue* DtoComplex(Loc& loc, Type* to, DValue* val);
void DtoComplexSet(LLValue* c, LLValue* re, LLValue* im);
void DtoComplexSet(llvm::Value* c, llvm::Value* re, llvm::Value* im);
void DtoGetComplexParts(Loc& loc, Type* to, DValue* c, DValue*& re, DValue*& im);
void DtoGetComplexParts(Loc& loc, Type* to, DValue* c, LLValue*& re, LLValue*& im);
void DtoGetComplexParts(Loc& loc, Type* to, DValue* c, llvm::Value*& re, llvm::Value*& im);
DValue* DtoComplexAdd(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
DValue* DtoComplexSub(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
@ -35,7 +49,7 @@ DValue* DtoComplexDiv(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
DValue* DtoComplexRem(Loc& loc, Type* type, DValue* lhs, DValue* rhs);
DValue* DtoComplexNeg(Loc& loc, Type* type, DValue* val);
LLValue* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs);
llvm::Value* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs);
DValue* DtoCastComplex(Loc& loc, DValue* val, Type* to);

View file

@ -7,26 +7,23 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "aggregate.h"
#include "declaration.h"
#include "enum.h"
#include "id.h"
#include "init.h"
#include "rmem.h"
#include "template.h"
#include "init.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "ir/ir.h"
#include "ir/irvar.h"
#include "ir/irtype.h"
#include "ir/irtypestruct.h"
#include "ir/irvar.h"
/* ================================================================== */

View file

@ -7,16 +7,13 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "gen/tollvm.h"
#include "gen/irstate.h"
#include "gen/logger.h"
#include "gen/dvalue.h"
#include "gen/llvmhelpers.h"
#include "declaration.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
/////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////
@ -95,6 +92,3 @@ LLValue* DConstValue::getRVal()
assert(c);
return c;
}
/////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -17,8 +17,8 @@
#ifndef LDC_GEN_DVALUE_H
#define LDC_GEN_DVALUE_H
#include <cassert>
#include "root.h"
#include <cassert>
struct Type;
struct Dsymbol;

View file

@ -7,36 +7,34 @@
//
//===----------------------------------------------------------------------===//
#include "gen/functions.h"
#include "aggregate.h"
#include "declaration.h"
#include "id.h"
#include "init.h"
#include "module.h"
#include "mtype.h"
#include "statement.h"
#include "template.h"
#include "gen/abi.h"
#include "gen/arrays.h"
#include "gen/classes.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "llvm/Support/CFG.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/nested.h"
#include "gen/pragma.h"
#include "gen/runtime.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/Intrinsics.h"
#else
#include "llvm/Intrinsics.h"
#endif
#include "mtype.h"
#include "aggregate.h"
#include "init.h"
#include "declaration.h"
#include "template.h"
#include "module.h"
#include "statement.h"
#include "id.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/runtime.h"
#include "gen/arrays.h"
#include "gen/logger.h"
#include "gen/functions.h"
#include "gen/todebug.h"
#include "gen/classes.h"
#include "gen/dvalue.h"
#include "gen/abi.h"
#include "gen/nested.h"
#include "gen/pragma.h"
#include "llvm/Support/CFG.h"
#include <iostream>
#if LDC_LLVM_VER < 302

View file

@ -16,13 +16,15 @@
#include "mars.h"
struct DValue;
struct Expression;
struct FuncDeclaration;
struct Type;
struct IRAsmBlock;
struct Parameter;
struct Type;
namespace llvm
{
class FunctionType;
class Value;
}

View file

@ -7,16 +7,13 @@
//
//===----------------------------------------------------------------------===//
#include <cstdarg>
#include "gen/llvm.h"
#include "mtype.h"
#include "declaration.h"
#include "statement.h"
#include "gen/irstate.h"
#include "tollvm.h"
#include "declaration.h"
#include "mtype.h"
#include "statement.h"
#include "gen/llvm.h"
#include "gen/tollvm.h"
#include <cstdarg>
IRState* gIR = 0;
llvm::TargetMachine* gTargetMachine = 0;

View file

@ -15,17 +15,15 @@
#ifndef LDC_GEN_IRSTATE_H
#define LDC_GEN_IRSTATE_H
#include <vector>
#include <deque>
#include <list>
#include <sstream>
#include "root.h"
#include "aggregate.h"
#include "root.h"
#include "ir/irfunction.h"
#include "ir/irstruct.h"
#include "ir/irvar.h"
#include <deque>
#include <list>
#include <sstream>
#include <vector>
#if LDC_LLVM_VER >= 302
#include "llvm/DIBuilder.h"

View file

@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef GEN_LLVM_H
#define GEN_LLVM_H
#ifndef LDC_GEN_LLVM_H
#define LDC_GEN_LLVM_H
#if LDC_LLVM_VER >= 303
#include "llvm/IR/Type.h"
@ -94,4 +94,4 @@ using llvm::IRBuilder;
using llvm::APFloat;
using llvm::APInt;
#endif // GEN_LLVM_H
#endif // LDC_GEN_LLVM_H

View file

@ -8,8 +8,8 @@
//===----------------------------------------------------------------------===//
#include "gen/llvmcompat.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Config/llvm-config.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"

View file

@ -8,36 +8,32 @@
//===----------------------------------------------------------------------===//
#include "gen/llvmhelpers.h"
#include "gen/llvm.h"
#include "mars.h"
#include "init.h"
#include "id.h"
#include "expression.h"
#include "template.h"
#include "id.h"
#include "init.h"
#include "mars.h"
#include "module.h"
#include "template.h"
#include "gen/arrays.h"
#include "gen/classes.h"
#include "gen/complex.h"
#include "gen/dvalue.h"
#include "gen/functions.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmcompat.h"
#include "gen/logger.h"
#include "gen/nested.h"
#include "gen/runtime.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "gen/typeinf.h"
#include "ir/irmodule.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/Target/TargetMachine.h"
#if LDC_LLVM_VER >= 301
#include "llvm/Transforms/Utils/ModuleUtils.h"
#endif
#include "gen/tollvm.h"
#include "gen/irstate.h"
#include "gen/runtime.h"
#include "gen/logger.h"
#include "gen/arrays.h"
#include "gen/dvalue.h"
#include "gen/complex.h"
#include "gen/classes.h"
#include "gen/functions.h"
#include "gen/typeinf.h"
#include "gen/todebug.h"
#include "gen/nested.h"
#include "ir/irmodule.h"
#include "gen/llvmcompat.h"
#include <stack>
/****************************************************************************************/

View file

@ -16,11 +16,10 @@
#ifndef LDC_GEN_LLVMHELPERS_H
#define LDC_GEN_LLVMHELPERS_H
#include "gen/llvm.h"
#include "gen/dvalue.h"
#include "statement.h"
#include "mtype.h"
#include "statement.h"
#include "gen/dvalue.h"
#include "gen/llvm.h"
// this is used for tracking try-finally, synchronized and volatile scopes
struct EnclosingHandler

View file

@ -7,17 +7,15 @@
//
//===----------------------------------------------------------------------===//
#include "mars.h"
#include "llvm/Support/CommandLine.h"
#include <cassert>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <string>
#include <iostream>
#include "mars.h"
#include "llvm/Support/CommandLine.h"
#include <string>
#if LDC_LLVM_VER >= 303
#include "llvm/IR/GlobalValue.h"

View file

@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef _llvmd_gen_logger_h_
#define _llvmd_gen_logger_h_
#ifndef LDC_GEN_LOGGER_H
#define LDC_GEN_LOGGER_H
#include <iosfwd>

View file

@ -7,7 +7,41 @@
//
//===----------------------------------------------------------------------===//
#include "aggregate.h"
#include "attrib.h"
#include "declaration.h"
#include "enum.h"
#include "id.h"
#include "import.h"
#include "init.h"
#include "mars.h"
#include "module.h"
#include "mtype.h"
#include "scope.h"
#include "statement.h"
#include "template.h"
#include "gen/abi.h"
#include "gen/arrays.h"
#include "gen/classes.h"
#include "gen/functions.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/optimizer.h"
#include "gen/programs.h"
#include "gen/rttibuilder.h"
#include "gen/runtime.h"
#include "gen/structs.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "ir/irdsymbol.h"
#include "ir/irmodule.h"
#include "ir/irtype.h"
#if !MODULEINFO_IS_STRUCT
#include "ir/irtypeclass.h"
#endif
#include "ir/irvar.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/LinkAllPasses.h"
#if LDC_LLVM_VER >= 303
@ -22,44 +56,6 @@
#endif
#endif
#include "mars.h"
#include "module.h"
#include "mtype.h"
#include "declaration.h"
#include "statement.h"
#include "enum.h"
#include "aggregate.h"
#include "init.h"
#include "attrib.h"
#include "id.h"
#include "import.h"
#include "template.h"
#include "scope.h"
#include "gen/abi.h"
#include "gen/arrays.h"
#include "gen/classes.h"
#include "gen/functions.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/programs.h"
#include "gen/rttibuilder.h"
#include "gen/runtime.h"
#include "gen/structs.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "gen/optimizer.h"
#include "ir/irdsymbol.h"
#include "ir/irmodule.h"
#include "ir/irtype.h"
#include "ir/irvar.h"
#if !MODULEINFO_IS_STRUCT
#include "ir/irtypeclass.h"
#endif
#if DMDV2
#define NEW_MODULEINFO_LAYOUT 1
#endif

View file

@ -7,26 +7,23 @@
//
//===----------------------------------------------------------------------===//
#include "expression.h"
#include "declaration.h"
#include "statement.h"
#include "template.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/InlineAsm.h"
#else
#include "llvm/InlineAsm.h"
#endif
#include "expression.h"
#include "statement.h"
#include "declaration.h"
#include "template.h"
#include <cassert>
#include "gen/logger.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/tollvm.h"
#include "gen/dvalue.h"
//////////////////////////////////////////////////////////////////////////////////////////
void Statement::toNakedIR(IRState *p)

View file

@ -8,15 +8,13 @@
//===----------------------------------------------------------------------===//
#include "gen/nested.h"
#include "gen/dvalue.h"
#include "gen/functions.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "gen/functions.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Support/CommandLine.h"
namespace cl = llvm::cl;

View file

@ -8,13 +8,12 @@
//===----------------------------------------------------------------------===//
#include "gen/optimizer.h"
#include "mars.h" // error()
#include "gen/cl_helpers.h"
#include "gen/logger.h"
#include "gen/passes/Passes.h"
#include "llvm/PassManager.h"
#include "llvm/LinkAllPasses.h"
#include "llvm/PassManager.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/Module.h"
#include "llvm/IR/DataLayout.h"
@ -35,8 +34,6 @@
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "mars.h" // error()
using namespace llvm;
// Allow the user to specify specific optimizations to run.

View file

@ -17,7 +17,6 @@
#define DEBUG_TYPE "simplify-drtcalls"
#include "Passes.h"
#include "llvm/Pass.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/Function.h"

View file

@ -9,11 +9,11 @@
#include "pragma.h"
#include "attrib.h"
#include "id.h"
#include "expression.h"
#include "scope.h"
#include "module.h"
#include "declaration.h"
#include "expression.h"
#include "id.h"
#include "module.h"
#include "scope.h"
#include "template.h"
#include "llvm/Support/CommandLine.h"

View file

@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef PRAGMA_H
#define PRAGMA_H
#ifndef LDC_GEN_PRAGMA_H
#define LDC_GEN_PRAGMA_H
#include <string>
@ -51,4 +51,4 @@ Pragma DtoGetPragma(Scope *sc, PragmaDeclaration *decl, std::string &arg1str);
void DtoCheckPragma(PragmaDeclaration *decl, Dsymbol *sym,
Pragma llvm_internal, const std::string &arg1str);
#endif // PRAGMA_H
#endif // LDC_GEN_PRAGMA_H

View file

@ -8,13 +8,11 @@
//===----------------------------------------------------------------------===//
#include "gen/programs.h"
#include "mars.h" // fatal()
#include "root.h" // error(char*)
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Program.h"
#include "root.h" // error(char*)
#include "mars.h" // fatal()
using namespace llvm;
static cl::opt<std::string> gcc("gcc",

View file

@ -7,18 +7,15 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "gen/rttibuilder.h"
#include "aggregate.h"
#include "mtype.h"
#include "gen/arrays.h"
#include "gen/irstate.h"
#include "gen/linkage.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/rttibuilder.h"
#include "gen/tollvm.h"
#include "ir/irstruct.h"
RTTIBuilder::RTTIBuilder(AggregateDeclaration* base_class)

View file

@ -12,22 +12,25 @@
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_GEN_RTTIBUILDER_H__
#define __LDC_GEN_RTTIBUILDER_H__
#ifndef LDC_GEN_RTTIBUILDER_H
#define LDC_GEN_RTTIBUILDER_H
#include "llvm/ADT/SmallVector.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/Constant.h"
#else
#include "llvm/Constant.h"
#endif
#include "llvm/ADT/SmallVector.h"
struct ClassDeclaration;
struct AggregateDeclaration;
struct TypeClass;
struct Type;
struct ClassDeclaration;
struct Dsymbol;
struct FuncDeclaration;
struct IrGlobal;
struct IrStruct;
struct Type;
struct TypeClass;
namespace llvm { class StructType; }
struct RTTIBuilder
{
@ -75,10 +78,10 @@ struct RTTIBuilder
/// Creates the initializer constant and assigns it to the global.
void finalize(IrGlobal* tid);
void finalize(LLType* type, LLValue* value);
void finalize(llvm::Type* type, llvm::Value* value);
/// Creates the initializer constant and assigns it to the global.
llvm::Constant* get_constant(LLStructType *initType);
llvm::Constant* get_constant(llvm::StructType* initType);
};
#endif

View file

@ -7,7 +7,22 @@
//
//===----------------------------------------------------------------------===//
#include "gen/runtime.h"
#include "aggregate.h"
#include "dsymbol.h"
#include "lexer.h"
#include "mars.h"
#include "module.h"
#include "mtype.h"
#include "root.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "ir/irtype.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/MemoryBuffer.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/Module.h"
#include "llvm/IR/Attributes.h"
@ -15,23 +30,6 @@
#include "llvm/Module.h"
#include "llvm/Attributes.h"
#endif
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/CommandLine.h"
#include "root.h"
#include "mars.h"
#include "lexer.h"
#include "dsymbol.h"
#include "mtype.h"
#include "aggregate.h"
#include "module.h"
#include "gen/runtime.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "gen/irstate.h"
#include "ir/irtype.h"
#if LDC_LLVM_VER < 302
using namespace llvm::Attribute;

View file

@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef LDC_GEN_RUNTIME_H_
#define LDC_GEN_RUNTIME_H_
#ifndef LDC_GEN_RUNTIME_H
#define LDC_GEN_RUNTIME_H
namespace llvm
{
@ -40,4 +40,4 @@ llvm::GlobalVariable* LLVM_D_GetRuntimeGlobal(llvm::Module* target, const char*
#define _adCmp "_adCmp2"
#endif
#endif // LDC_GEN_RUNTIME_H_
#endif // LDC_GEN_RUNTIME_H

View file

@ -7,39 +7,37 @@
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
#include <math.h>
#include <fstream>
#include "init.h"
#include "mars.h"
#include "module.h"
#include "mtype.h"
#include "port.h"
#include "gen/abi.h"
#include "gen/arrays.h"
#include "gen/dvalue.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/runtime.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "ir/irfunction.h"
#include "ir/irlandingpad.h"
#include "ir/irmodule.h"
#include "llvm/Support/CFG.h"
#if LDC_LLVM_VER >= 303
#include "llvm/IR/InlineAsm.h"
#else
#include "llvm/InlineAsm.h"
#endif
#include "llvm/Support/CFG.h"
#include <fstream>
#include <math.h>
#include <stdio.h>
#include "mars.h"
#include "init.h"
#include "mtype.h"
// Need to include this after the other DMD includes because of missing
// dependencies.
#include "hdrgen.h"
#include "port.h"
#include "module.h"
#include "gen/irstate.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/runtime.h"
#include "gen/arrays.h"
#include "gen/todebug.h"
#include "gen/dvalue.h"
#include "gen/abi.h"
#include "ir/irfunction.h"
#include "ir/irmodule.h"
#include "ir/irlandingpad.h"
//////////////////////////////////////////////////////////////////////////////

View file

@ -7,29 +7,25 @@
//
//===----------------------------------------------------------------------===//
#include <algorithm>
#include "gen/llvm.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/ManagedStatic.h"
#include "mtype.h"
#include "aggregate.h"
#include "init.h"
#include "declaration.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "init.h"
#include "mtype.h"
#include "gen/arrays.h"
#include "gen/logger.h"
#include "gen/structs.h"
#include "gen/dvalue.h"
#include "gen/functions.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/structs.h"
#include "gen/tollvm.h"
#include "gen/utils.h"
#include "ir/irstruct.h"
#include "ir/irtypestruct.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/ManagedStatic.h"
#include <algorithm>
//////////////////////////////////////////////////////////////////////////////////////////

View file

@ -11,10 +11,23 @@
//
//===----------------------------------------------------------------------===//
#ifndef LLVMD_GEN_STRUCTS_H
#define LLVMD_GEN_STRUCTS_H
#ifndef LDC_GEN_STRUCTS_H
#define LDC_GEN_STRUCTS_H
#include "lexer.h"
#include <vector>
struct DValue;
struct StructDeclaration;
struct StructInitializer;
struct Type;
struct VarDeclaration;
namespace llvm
{
class Constant;
class Type;
class Value;
}
/**
* Sets up codegen metadata and emits global data (.init, etc.), if needed.
@ -24,31 +37,30 @@ struct StructInitializer;
void DtoResolveStruct(StructDeclaration* sd);
/// Build constant struct initializer.
LLConstant* DtoConstStructInitializer(StructInitializer* si);
llvm::Constant* DtoConstStructInitializer(StructInitializer* si);
/// Build values for a struct literal.
std::vector<llvm::Value*> DtoStructLiteralValues(const StructDeclaration* sd,
const std::vector<llvm::Value*>& inits,
bool isConst = false);
const std::vector<llvm::Value*>& inits, bool isConst = false);
/// Returns a boolean=true if the two structs are equal.
LLValue* DtoStructEquals(TOK op, DValue* lhs, DValue* rhs);
llvm::Value* DtoStructEquals(TOK op, DValue* lhs, DValue* rhs);
/// index a struct one level
LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd);
llvm::Value* DtoIndexStruct(llvm::Value* src, StructDeclaration* sd, VarDeclaration* vd);
/// Return the type returned by DtoUnpaddedStruct called on a value of the
/// specified type.
/// Union types will get expanded into a struct, with a type for each member.
LLType* DtoUnpaddedStructType(Type* dty);
llvm::Type* DtoUnpaddedStructType(Type* dty);
/// Return the struct value represented by v without the padding fields.
/// Unions will be expanded, with a value for each member.
/// Note: v must be a pointer to a struct, but the return value will be a
/// first-class struct value.
LLValue* DtoUnpaddedStruct(Type* dty, LLValue* v);
llvm::Value* DtoUnpaddedStruct(Type* dty, llvm::Value* v);
/// Undo the transformation performed by DtoUnpaddedStruct, writing to lval.
void DtoPaddedStruct(Type* dty, LLValue* v, LLValue* lval);
void DtoPaddedStruct(Type* dty, llvm::Value* v, llvm::Value* lval);
#endif

View file

@ -7,21 +7,18 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "mtype.h"
#include "declaration.h"
#include "id.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/irstate.h"
#include "mtype.h"
#include "gen/abi.h"
#include "gen/dvalue.h"
#include "gen/functions.h"
#include "gen/abi.h"
#include "gen/nested.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/nested.h"
#include "gen/tollvm.h"
//////////////////////////////////////////////////////////////////////////////////////////

View file

@ -7,26 +7,23 @@
//
//===----------------------------------------------------------------------===//
#include "gen/todebug.h"
#include "declaration.h"
#include "mars.h"
#include "module.h"
#include "gen/irstate.h"
#include "gen/linkage.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "gen/utils.h"
#include "ir/irmodule.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "declaration.h"
#include "module.h"
#include "mars.h"
#include "gen/todebug.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/logger.h"
#include "gen/llvmhelpers.h"
#include "gen/linkage.h"
#include "gen/utils.h"
#include "ir/irmodule.h"
using namespace llvm::dwarf;
//////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -14,8 +14,8 @@
#ifndef LDC_GEN_TODEBUG_H
#define LDC_GEN_TODEBUG_H
#include "gen/tollvm.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
void RegisterDwarfSymbols(llvm::Module* mod);

View file

@ -7,44 +7,40 @@
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
#include <math.h>
#include <fstream>
#include "gen/llvm.h"
#include "llvm/Support/CommandLine.h"
#include "attrib.h"
#include "enum.h"
#include "hdrgen.h"
#include "id.h"
#include "init.h"
#include "mtype.h"
#include "template.h"
#include "hdrgen.h"
#include "port.h"
#include "rmem.h"
#include "id.h"
#include "enum.h"
#include "gen/irstate.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/runtime.h"
#include "template.h"
#include "gen/aa.h"
#include "gen/arrays.h"
#include "gen/structs.h"
#include "gen/classes.h"
#include "gen/typeinf.h"
#include "gen/complex.h"
#include "gen/dvalue.h"
#include "gen/aa.h"
#include "gen/functions.h"
#include "gen/todebug.h"
#include "gen/irstate.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/nested.h"
#include "gen/utils.h"
#include "gen/warnings.h"
#include "gen/optimizer.h"
#include "gen/pragma.h"
#include "gen/runtime.h"
#include "gen/structs.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "gen/typeinf.h"
#include "gen/utils.h"
#include "gen/warnings.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include <fstream>
#include <math.h>
#include <stdio.h>
llvm::cl::opt<bool> checkPrintf("check-printf-calls",
llvm::cl::desc("Validate printf call format strings against arguments"),

View file

@ -7,30 +7,27 @@
//
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "dsymbol.h"
#include "gen/tollvm.h"
#include "aggregate.h"
#include "declaration.h"
#include "init.h"
#include "dsymbol.h"
#include "id.h"
#include "init.h"
#include "module.h"
#include "gen/tollvm.h"
#include "gen/irstate.h"
#include "gen/logger.h"
#include "gen/runtime.h"
#include "gen/arrays.h"
#include "gen/classes.h"
#include "gen/complex.h"
#include "gen/dvalue.h"
#include "gen/functions.h"
#include "gen/structs.h"
#include "gen/classes.h"
#include "gen/typeinf.h"
#include "gen/complex.h"
#include "gen/llvmhelpers.h"
#include "gen/irstate.h"
#include "gen/linkage.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/pragma.h"
#include "gen/runtime.h"
#include "gen/structs.h"
#include "gen/typeinf.h"
#include "ir/irtype.h"
#include "ir/irtypeclass.h"
#include "ir/irtypefunction.h"

View file

@ -16,12 +16,11 @@
#ifndef LDC_GEN_TOLLVM_H
#define LDC_GEN_TOLLVM_H
#include "gen/llvm.h"
#include "lexer.h"
#include "mtype.h"
#include "attrib.h"
#include "declaration.h"
#include "lexer.h"
#include "mtype.h"
#include "gen/llvm.h"
#include "gen/structs.h"
// D->LLVM type handling stuff

View file

@ -15,6 +15,7 @@
#ifndef LDC_GEN_TYPEINF_H
#define LDC_GEN_TYPEINF_H
struct TypeInfoDeclaration;
void DtoResolveTypeInfo(TypeInfoDeclaration* tid);
void DtoDeclareTypeInfo(TypeInfoDeclaration* tid);
void DtoConstInitTypeInfo(TypeInfoDeclaration* tid);

View file

@ -20,39 +20,35 @@
// Copyright (c) 2007 by Tomas Lindquist Olsen
// tomas at famolsen dk
#include <cstdio>
#include <cassert>
#include "gen/llvm.h"
#include "aggregate.h"
#include "attrib.h"
#include "declaration.h"
#include "enum.h"
#include "expression.h"
#include "id.h"
#include "import.h"
#include "init.h"
#include "mars.h"
#include "module.h"
#include "mtype.h"
#include "scope.h"
#include "init.h"
#include "expression.h"
#include "attrib.h"
#include "declaration.h"
#include "template.h"
#include "id.h"
#include "enum.h"
#include "import.h"
#include "aggregate.h"
#include "gen/irstate.h"
#include "gen/logger.h"
#include "gen/runtime.h"
#include "gen/tollvm.h"
#include "gen/llvmhelpers.h"
#include "gen/arrays.h"
#include "gen/structs.h"
#include "gen/classes.h"
#include "gen/irstate.h"
#include "gen/linkage.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/metadata.h"
#include "gen/rttibuilder.h"
#include "ir/irvar.h"
#include "gen/runtime.h"
#include "gen/structs.h"
#include "gen/tollvm.h"
#include "ir/irtype.h"
#include "ir/irvar.h"
#include <cassert>
#include <cstdio>
#include <ir/irtypeclass.h>
/*******************************************

View file

@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_GEN_UTILS_H__
#define __LDC_GEN_UTILS_H__
#ifndef LDC_GEN_UTILS_H
#define LDC_GEN_UTILS_H
#include "root.h"

View file

@ -7,11 +7,8 @@
//
//===----------------------------------------------------------------------===//
#include "mars.h"
#include "mtype.h"
#include "expression.h"
#include "gen/warnings.h"
#include "mtype.h"
void warnInvalidPrintfCall(Loc loc, Expression* arguments, size_t nargs)
{

View file

@ -11,9 +11,12 @@
//
//===----------------------------------------------------------------------===//
#ifndef __LDC_GEN_WARNINGS_H__
#define __LDC_GEN_WARNINGS_H__
#ifndef LDC_GEN_WARNINGS_H
#define LDC_GEN_WARNINGS_H
#include "expression.h"
#include "mars.h"
void warnInvalidPrintfCall(Loc loc, Expression* arguments, size_t nargs);
#endif // __LDC_GEN_WARNINGS_H__
#endif // LDC_GEN_WARNINGS_H

View file

@ -16,10 +16,9 @@
#ifndef LDC_IR_IR_H
#define LDC_IR_IR_H
#include <deque>
#include "ir/irforw.h"
#include "root.h"
#include "ir/irforw.h"
#include <deque>
struct IRState;
struct IrFunction;

View file

@ -8,12 +8,11 @@
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "gen/logger.h"
#include "ir/ir.h"
#include "ir/irdsymbol.h"
#include "ir/irvar.h"
#include "gen/logger.h"
std::set<IrDsymbol*> IrDsymbol::list;
void IrDsymbol::resetAll()

View file

@ -10,7 +10,6 @@
#include "gen/llvm.h"
#include "gen/tollvm.h"
#include "ir/irfunction.h"
#include <sstream>
FuncGen::FuncGen()

View file

@ -19,10 +19,9 @@
#include "gen/llvm.h"
#include "ir/ir.h"
#include "ir/irlandingpad.h"
#include <vector>
#include <stack>
#include <map>
#include <stack>
#include <vector>
struct Statement;
struct EnclosingHandler;

View file

@ -8,13 +8,11 @@
//===----------------------------------------------------------------------===//
#include "ir/irfuncty.h"
#include "mtype.h"
#include "gen/abi.h"
#include "gen/dvalue.h"
#include "gen/logger.h"
#include "gen/llvm.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#if LDC_LLVM_VER >= 303

View file

@ -8,13 +8,13 @@
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "gen/tollvm.h"
#include "gen/irstate.h"
#include "gen/runtime.h"
#include "gen/logger.h"
#include "gen/classes.h"
#include "gen/irstate.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/runtime.h"
#include "gen/todebug.h"
#include "gen/tollvm.h"
#include "ir/irlandingpad.h"
IRLandingPadInfo::IRLandingPadInfo(Catch* catchstmt_, llvm::BasicBlock* end_) :

View file

@ -15,9 +15,8 @@
#ifndef LDC_IR_IRLANDINGPADINFO_H
#define LDC_IR_IRLANDINGPADINFO_H
#include "ir/ir.h"
#include "statement.h"
#include "ir/ir.h"
#include <deque>
#include <stack>

View file

@ -8,8 +8,8 @@
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "gen/tollvm.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "ir/irmodule.h"
IrModule::IrModule(Module* module, const char* srcfilename)

View file

@ -8,21 +8,17 @@
//===----------------------------------------------------------------------===//
#include "gen/llvm.h"
#include "mtype.h"
#include "aggregate.h"
#include "declaration.h"
#include "init.h"
#include "mtype.h"
#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/logger.h"
#include "gen/llvmhelpers.h"
#include "gen/logger.h"
#include "gen/tollvm.h"
#include "gen/utils.h"
#include "ir/irstruct.h"
#include "ir/irtypeclass.h"
#include <algorithm>
//////////////////////////////////////////////////////////////////////////////

View file

@ -16,9 +16,8 @@
#define LDC_IR_IRSTRUCT_H
#include "ir/ir.h"
#include <vector>
#include <map>
#include <vector>
// DMD forward declarations
struct StructInitializer;

View file

@ -13,22 +13,20 @@
//
//===----------------------------------------------------------------------===//
#include <map>
#include <string>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "llvm/TableGen/Main.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/PathV1.h"
#include "llvm/TableGen/Record.h"
#if LDC_LLVM_VER < 302
#include "llvm/TableGen/TableGenAction.h"
#endif
#include "llvm/TableGen/Record.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/PathV1.h"
#include "llvm/ADT/StringRef.h"
#include <algorithm>
#include <assert.h>
#include <map>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
using namespace llvm;