aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/Analysis.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-03-31 04:46:31 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-03-31 04:46:31 +0000
commit2e0ffe985896c332c51bc6be50c26087e755c6f9 (patch)
treef9afe1cbf6edddd84b8238bec17222171b771266 /llvm/lib/CodeGen/Analysis.cpp
parentadeae05f2d189c779f1caf412694b4ba306f973d (diff)
downloadllvm-2e0ffe985896c332c51bc6be50c26087e755c6f9.zip
llvm-2e0ffe985896c332c51bc6be50c26087e755c6f9.tar.gz
llvm-2e0ffe985896c332c51bc6be50c26087e755c6f9.tar.bz2
Move llvm::canBeOmittedFromSymbolTable() to Analysis.
llvm-svn: 299182
Diffstat (limited to 'llvm/lib/CodeGen/Analysis.cpp')
-rw-r--r--llvm/lib/CodeGen/Analysis.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp
index afbb854..09a37a7 100644
--- a/llvm/lib/CodeGen/Analysis.cpp
+++ b/llvm/lib/CodeGen/Analysis.cpp
@@ -612,25 +612,6 @@ bool llvm::returnTypeIsEligibleForTailCall(const Function *F,
return true;
}
-bool llvm::canBeOmittedFromSymbolTable(const GlobalValue *GV) {
- if (!GV->hasLinkOnceODRLinkage())
- return false;
-
- // We assume that anyone who sets global unnamed_addr on a non-constant knows
- // what they're doing.
- if (GV->hasGlobalUnnamedAddr())
- return true;
-
- // If it is a non constant variable, it needs to be uniqued across shared
- // objects.
- if (const GlobalVariable *Var = dyn_cast<GlobalVariable>(GV)) {
- if (!Var->isConstant())
- return false;
- }
-
- return GV->hasAtLeastLocalUnnamedAddr();
-}
-
static void collectFuncletMembers(
DenseMap<const MachineBasicBlock *, int> &FuncletMembership, int Funclet,
const MachineBasicBlock *MBB) {