summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/ModuleUtils.cpp
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-04-10 20:36:30 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-04-10 20:36:30 +0000
commitba7c2e9661863644bfed7f40a28434cd338ff1bb (patch)
treef58255d438e121d0c1755074e115ab58bd1da79c /llvm/lib/Transforms/Utils/ModuleUtils.cpp
parent211b1f324fec79eddecccc4cb43a284bd3324cd5 (diff)
downloadbcm5719-llvm-ba7c2e9661863644bfed7f40a28434cd338ff1bb.tar.gz
bcm5719-llvm-ba7c2e9661863644bfed7f40a28434cd338ff1bb.zip
Revert "[asan] Fix dead stripping of globals on Linux."
This reverts commit r299697, which caused a big increase in object file size. llvm-svn: 299879
Diffstat (limited to 'llvm/lib/Transforms/Utils/ModuleUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/ModuleUtils.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/llvm/lib/Transforms/Utils/ModuleUtils.cpp b/llvm/lib/Transforms/Utils/ModuleUtils.cpp
index 29d334f2968..dbe42c201dd 100644
--- a/llvm/lib/Transforms/Utils/ModuleUtils.cpp
+++ b/llvm/lib/Transforms/Utils/ModuleUtils.cpp
@@ -237,35 +237,3 @@ void llvm::filterDeadComdatFunctions(
ComdatEntriesCovered.end();
});
}
-
-std::string llvm::getUniqueModuleId(Module *M) {
- MD5 Md5;
- bool ExportsSymbols = false;
- auto AddGlobal = [&](GlobalValue &GV) {
- if (GV.isDeclaration() || GV.getName().startswith("llvm.") ||
- !GV.hasExternalLinkage())
- return;
- ExportsSymbols = true;
- Md5.update(GV.getName());
- Md5.update(ArrayRef<uint8_t>{0});
- };
-
- for (auto &F : *M)
- AddGlobal(F);
- for (auto &GV : M->globals())
- AddGlobal(GV);
- for (auto &GA : M->aliases())
- AddGlobal(GA);
- for (auto &IF : M->ifuncs())
- AddGlobal(IF);
-
- if (!ExportsSymbols)
- return "";
-
- MD5::MD5Result R;
- Md5.final(R);
-
- SmallString<32> Str;
- MD5::stringifyResult(R, Str);
- return ("$" + Str).str();
-}
OpenPOWER on IntegriCloud