1 //===-- ModuleUtils.h - Functions to manipulate Modules ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This family of functions perform manipulations on Modules.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H
15 #define LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H
22 /// Append F to the list of global ctors of module M with the given Priority.
23 /// This wraps the function in the appropriate structure and stores it along
24 /// side other global constructors. For details see
25 /// http://llvm.org/docs/LangRef.html#intg_global_ctors
26 void appendToGlobalCtors(Module &M, Function *F, int Priority);
28 /// Same as appendToGlobalCtors(), but for global dtors.
29 void appendToGlobalDtors(Module &M, Function *F, int Priority);
31 } // End llvm namespace
33 #endif // LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H