view ir/irmodule.cpp @ 1647:638a823ace45

Strange workaround for returning from within 'void main()'. The new dmdfe sets the ReturnStatement->exp to null. Fixed bug #391.
author Kelly Wilson <wilsonk cpsc.ucalgary.ca>
date Wed, 10 Mar 2010 19:35:14 -0700
parents ad7f2f1862d6
children
line wrap: on
line source

#include "gen/llvm.h"
#include "gen/tollvm.h"
#include "gen/irstate.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()
{
}