annotate gen/linker.h @ 883:b52d5de7783f

GC defines and linkage changes.
author Christian Kamm <kamm incasoftware de>
date Thu, 08 Jan 2009 18:20:02 +0100
parents 075c1272a01d
children a8cb25d478c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
664
eef8ac26c66c Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents: 306
diff changeset
1 #ifndef LDC_GEN_LINKER_H
eef8ac26c66c Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents: 306
diff changeset
2 #define LDC_GEN_LINKER_H
244
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
3
284
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
4 #include <vector>
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
5
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
6 namespace llvm
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
7 {
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
8 class Module;
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
9 }
70c370e97944 [svn r305] Started support for custom class allocators/deallocators. Allocators with more than one argument still need to be fixed.
lindquist
parents: 277
diff changeset
10
244
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
11 /**
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
12 * Links the modules given in MV in to dst.
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
13 * @param dst Destination module.
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
14 * @param MV Vector of modules to link in to destination.
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
15 */
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
16 void linkModules(llvm::Module* dst, const std::vector<llvm::Module*>& MV);
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
17
276
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
18 /**
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
19 * Link an executable.
306
0baca2feb554 [svn r327] Fixed some more MinGW32 issues. It's now very close to working.
lindquist
parents: 284
diff changeset
20 * @param argv0 the argv[0] value as passed to main
276
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
21 * @return 0 on success.
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
22 */
306
0baca2feb554 [svn r327] Fixed some more MinGW32 issues. It's now very close to working.
lindquist
parents: 284
diff changeset
23 int linkExecutable(const char* argv0);
276
21f85bac0b1a [svn r297] Fixed: rewrote linker code to use LLVM's Program facilities instead of DMD's oldschool broken "native" approach.
lindquist
parents: 244
diff changeset
24
277
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
25 /**
677
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
26 * Link an executable only from object files.
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
27 * @param argv0 the argv[0] value as passed to main
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
28 * @return 0 on success.
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
29 */
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
30 int linkObjToExecutable(const char* argv0);
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
31
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
32 /**
277
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
33 * Delete the executable that was previously linked with linkExecutable.
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
34 */
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
35 void deleteExecutable();
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
36
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
37 /**
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
38 * Runs the executable that was previously linked with linkExecutable.
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
39 * @return the return status of the executable.
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
40 */
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
41 int runExectuable();
90a8c798b0db [svn r298] Eliminated the dmd/link.c source file entirely in favor of a llvm::sys based approach to the same functionality.
lindquist
parents: 276
diff changeset
42
664
eef8ac26c66c Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents: 306
diff changeset
43 #endif // LDC_GEN_LINKER_H