summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-02-05 15:44:27 +0000
committerTeresa Johnson <tejohnson@google.com>2018-02-05 15:44:27 +0000
commit5a95c477305d0f25be289461eb3277f97b84ab08 (patch)
tree7b195f05af6cd1ce615fac0ff8a20694c0e262ba /llvm/include
parent02947b71123a484bfebd060abd53bf4a65247a01 (diff)
downloadbcm5719-llvm-5a95c477305d0f25be289461eb3277f97b84ab08.tar.gz
bcm5719-llvm-5a95c477305d0f25be289461eb3277f97b84ab08.zip
[ThinLTO] Convert dead alias to declarations
Summary: This complements the fixes in r323633 and r324075 which drop the definitions of dead functions and variables, respectively. Fixes PR36208. Reviewers: grimar, rafael Subscribers: mehdi_amini, llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D42856 llvm-svn: 324242
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Transforms/IPO/FunctionImport.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/Transforms/IPO/FunctionImport.h b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
index 32e92e562e7..5fedde1126b 100644
--- a/llvm/include/llvm/Transforms/IPO/FunctionImport.h
+++ b/llvm/include/llvm/Transforms/IPO/FunctionImport.h
@@ -122,8 +122,9 @@ void computeDeadSymbols(
const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
function_ref<PrevailingType(GlobalValue::GUID)> isPrevailing);
-/// Converts value \p GV to declaration.
-void convertToDeclaration(GlobalValue &GV);
+/// Converts value \p GV to declaration, or replaces with a declaration if
+/// it is an alias. Returns true if converted, false if replaced.
+bool convertToDeclaration(GlobalValue &GV);
/// Compute the set of summaries needed for a ThinLTO backend compilation of
/// \p ModulePath.
OpenPOWER on IntegriCloud