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

This reduces the size of a statically linked Phobos-based Hello World by 11 kB on Linux x86_64. Also creates a header file for gen/module.cpp, which has been renamed to "modules" such as not to conflict with the frontend header file.
20 lines
755 B
C++
20 lines
755 B
C++
//===-- gen/modules.h - Entry points for D module codegen -------*- C++ -*-===//
|
||
//
|
||
// LDC – the LLVM D compiler
|
||
//
|
||
// This file is distributed under the BSD-style LDC license. See the LICENSE
|
||
// file for details.
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
|
||
struct IRState;
|
||
class Module;
|
||
|
||
/// Sets the m->*file members to the output file names, as derived from platform
|
||
/// and command line switches, making sure that they are valid paths and don't
|
||
/// conflict with the source file.
|
||
void buildTargetFiles(Module *m, bool singleObj, bool library);
|
||
|
||
/// Generates code for the contents of module m into the LLVM module associated
|
||
/// with irs.
|
||
void codegenModule(IRState *irs, Module *m);
|