mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-10-26 11:47:25 +01:00
Use new functions appendToGlobalCtors() and appendToGlobalDtors.
This simplifies the code in module.cpp a bit. But it is also the base to implement a pragma to place an arbitrary function in llvm.global_ctors and llvm.global_dtors.
This commit is contained in:
@@ -14,12 +14,19 @@
|
||||
|
||||
#if LDC_LLVM_VER == 300
|
||||
namespace llvm {
|
||||
class Module;
|
||||
class Function;
|
||||
|
||||
namespace sys {
|
||||
std::string getDefaultTargetTriple();
|
||||
}
|
||||
|
||||
Triple Triple__get32BitArchVariant(const std::string&_this);
|
||||
Triple Triple__get64BitArchVariant(const std::string& _this);
|
||||
|
||||
// From Transforms/Utils/ModuleUtils
|
||||
void appendToGlobalCtors(Module &M, Function *F, int Priority);
|
||||
void appendToGlobalDtors(Module &M, Function *F, int Priority);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user