aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 4c24461..60056f1 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -673,21 +673,6 @@ GlobalVariable *llvm::collectUsedGlobalVariables(
return GV;
}
-GlobalVariable *llvm::collectUsedGlobalVariables(
- const Module &M, SmallPtrSetImpl<GlobalValue *> &Set, bool CompilerUsed) {
- const char *Name = CompilerUsed ? "llvm.compiler.used" : "llvm.used";
- GlobalVariable *GV = M.getGlobalVariable(Name);
- if (!GV || !GV->hasInitializer())
- return GV;
-
- const ConstantArray *Init = cast<ConstantArray>(GV->getInitializer());
- for (Value *Op : Init->operands()) {
- GlobalValue *G = cast<GlobalValue>(Op->stripPointerCasts());
- Set.insert(G);
- }
- return GV;
-}
-
void Module::setPartialSampleProfileRatio(const ModuleSummaryIndex &Index) {
if (auto *SummaryMD = getProfileSummary(/*IsCS*/ false)) {
std::unique_ptr<ProfileSummary> ProfileSummary(