mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00

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.
26 lines
729 B
C++
26 lines
729 B
C++
//===-- irmodule.cpp ------------------------------------------------------===//
|
||
//
|
||
// LDC – the LLVM D compiler
|
||
//
|
||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||
// file for details.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
|
||
#include "gen/llvm.h"
|
||
#include "gen/irstate.h"
|
||
#include "gen/tollvm.h"
|
||
#include "ir/irmodule.h"
|
||
|
||
IrModule::IrModule(Module* module, const char* srcfilename)
|
||
{
|
||
M = module;
|
||
|
||
LLConstant* slice = DtoConstString(srcfilename);
|
||
fileName = new llvm::GlobalVariable(
|
||
*gIR->module, slice->getType(), true, LLGlobalValue::InternalLinkage, slice, ".modulefilename");
|
||
}
|
||
|
||
IrModule::~IrModule()
|
||
{
|
||
}
|