summaryrefslogtreecommitdiff
path: root/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
commit3845c071a7b4ff54d7d8ff4642a66e3a666349d1 (patch)
tree4162e4420434e64a5f60e7dc60427bcfd1279f57 /lib/LTO
parent172e0ca8c5c7af54cd88a0620ccb72fccce0abef (diff)
downloadllvm-3845c071a7b4ff54d7d8ff4642a66e3a666349d1.tar.gz
llvm-3845c071a7b4ff54d7d8ff4642a66e3a666349d1.tar.bz2
llvm-3845c071a7b4ff54d7d8ff4642a66e3a666349d1.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO')
-rw-r--r--lib/LTO/LTOCodeGenerator.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp
index b7f41357af..51d0899881 100644
--- a/lib/LTO/LTOCodeGenerator.cpp
+++ b/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);