From a303c417bbdb53703c2c17398b08486bde78f1f6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 2 May 2017 18:30:13 +0000 Subject: Vendor import of llvm trunk r301939: https://llvm.org/svn/llvm-project/llvm/trunk@301939 --- include/llvm/Transforms/Utils/ModuleUtils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/llvm/Transforms/Utils/ModuleUtils.h') diff --git a/include/llvm/Transforms/Utils/ModuleUtils.h b/include/llvm/Transforms/Utils/ModuleUtils.h index f5e843e2e8b55..e9793fe4b6666 100644 --- a/include/llvm/Transforms/Utils/ModuleUtils.h +++ b/include/llvm/Transforms/Utils/ModuleUtils.h @@ -84,6 +84,17 @@ void appendToCompilerUsed(Module &M, ArrayRef Values); void filterDeadComdatFunctions( Module &M, SmallVectorImpl &DeadComdatFunctions); +/// \brief Produce a unique identifier for this module by taking the MD5 sum of +/// the names of the module's strong external symbols. +/// +/// This identifier is normally guaranteed to be unique, or the program would +/// fail to link due to multiply defined symbols. +/// +/// If the module has no strong external symbols (such a module may still have a +/// semantic effect if it performs global initialization), we cannot produce a +/// unique identifier for this module, so we return the empty string. +std::string getUniqueModuleId(Module *M); + } // End llvm namespace #endif // LLVM_TRANSFORMS_UTILS_MODULEUTILS_H -- cgit v1.2.3