summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-02 22:05:57 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-04-02 22:05:57 +0000
commit4680f40d28f1de7b2c8b01ef7422d4e1e001ee01 (patch)
tree04d183e430ee87b100efb521ad5a39c022ea9e9c /llvm/lib/LTO
parent7c62b1e2df601630c9cf5074560763e944974c93 (diff)
downloadbcm5719-llvm-4680f40d28f1de7b2c8b01ef7422d4e1e001ee01.tar.gz
bcm5719-llvm-4680f40d28f1de7b2c8b01ef7422d4e1e001ee01.zip
Revert "Reapply "LTO: add API to set strategy for -internalize""
This reverts commit r199244. Conflicts: include/llvm-c/lto.h include/llvm/LTO/LTOCodeGenerator.h lib/LTO/LTOCodeGenerator.cpp llvm-svn: 205471
Diffstat (limited to 'llvm/lib/LTO')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index b7f41357af8..51d08998817 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -65,8 +65,7 @@ const char* LTOCodeGenerator::getVersionString() {
LTOCodeGenerator::LTOCodeGenerator()
: Context(getGlobalContext()), Linker(new Module("ld-temp.o", Context)),
TargetMach(NULL), EmitDwarfDebugInfo(false), ScopeRestrictionsDone(false),
- CodeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),
- InternalizeStrategy(LTO_INTERNALIZE_FULL), NativeObjectFile(NULL),
+ CodeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC), NativeObjectFile(NULL),
DiagHandler(NULL), DiagContext(NULL) {
initializeLTOPasses();
}
@@ -169,18 +168,6 @@ void LTOCodeGenerator::setCodePICModel(lto_codegen_model model) {
llvm_unreachable("Unknown PIC model!");
}
-void
-LTOCodeGenerator::setInternalizeStrategy(lto_internalize_strategy Strategy) {
- switch (Strategy) {
- case LTO_INTERNALIZE_FULL:
- case LTO_INTERNALIZE_NONE:
- case LTO_INTERNALIZE_HIDDEN:
- InternalizeStrategy = Strategy;
- return;
- }
- llvm_unreachable("Unknown internalize strategy!");
-}
-
bool LTOCodeGenerator::writeMergedModules(const char *path,
std::string &errMsg) {
if (!determineTarget(errMsg))
@@ -402,7 +389,7 @@ static void accumulateAndSortLibcalls(std::vector<StringRef> &Libcalls,
}
void LTOCodeGenerator::applyScopeRestrictions() {
- if (ScopeRestrictionsDone || !shouldInternalize())
+ if (ScopeRestrictionsDone)
return;
Module *mergedModule = Linker.getModule();
@@ -454,8 +441,7 @@ void LTOCodeGenerator::applyScopeRestrictions() {
LLVMCompilerUsed->setSection("llvm.metadata");
}
- passes.add(
- createInternalizePass(MustPreserveList, shouldOnlyInternalizeHidden()));
+ passes.add(createInternalizePass(MustPreserveList));
// apply scope restrictions
passes.run(*mergedModule);
OpenPOWER on IntegriCloud