1//===-- ModuleUtils.h - Functions to manipulate Modules ---------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This family of functions perform manipulations on Modules. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H 15#define LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H 16 17namespace llvm { 18 19class Module; 20class Function; 21 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 26void appendToGlobalCtors(Module &M, Function *F, int Priority); 27 28/// Same as appendToGlobalCtors(), but for global dtors. 29void appendToGlobalDtors(Module &M, Function *F, int Priority); 30 31} // End llvm namespace 32 33#endif // LLVM_TRANSFORMS_UTILS_MODULE_UTILS_H 34