annotate gen/linker.h @ 1638:0de4525a9ed6

Apply workaround for #395 by klickverbot.
author Christian Kamm <kamm incasoftware de>
date Mon, 08 Mar 2010 20:06:08 +0100
parents 2bebd938548f
children
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
986
a8cb25d478c4 Use LLVM-style command line (instead of DMD-style)
Frits van Bommel <fvbommel wxs.nl>
parents: 677
diff changeset
4 #include "llvm/Support/CommandLine.h"
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
5 #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
6
986
a8cb25d478c4 Use LLVM-style command line (instead of DMD-style)
Frits van Bommel <fvbommel wxs.nl>
parents: 677
diff changeset
7 extern llvm::cl::opt<bool> quiet;
a8cb25d478c4 Use LLVM-style command line (instead of DMD-style)
Frits van Bommel <fvbommel wxs.nl>
parents: 677
diff changeset
8
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
9 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
10 {
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
11 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
12 }
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
13
244
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
14 /**
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
15 * 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
16 * @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
17 * @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
18 */
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents:
diff changeset
19 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
20
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 /**
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 * Link an executable.
306
0baca2feb554 [svn r327] Fixed some more MinGW32 issues. It's now very close to working.
lindquist
parents: 284
diff changeset
23 * @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
24 * @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
25 */
306
0baca2feb554 [svn r327] Fixed some more MinGW32 issues. It's now very close to working.
lindquist
parents: 284
diff changeset
26 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
27
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
28 /**
677
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
29 * Link an executable only from object files.
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
30 * @param argv0 the argv[0] value as passed to main
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
31 * @return 0 on success.
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
32 */
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
33 int linkObjToExecutable(const char* argv0);
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
34
075c1272a01d Link using gcc instead.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
35 /**
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
36 * 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
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 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
39
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 * 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
42 * @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
43 */
1313
2bebd938548f Fix typo in function name
Frits van Bommel <fvbommel wxs.nl>
parents: 986
diff changeset
44 int runExecutable();
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
45
664
eef8ac26c66c Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents: 306
diff changeset
46 #endif // LDC_GEN_LINKER_H