diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-04-08 17:20:55 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-04-08 17:20:55 +0000 |
commit | 34797136cb9fa9f450c0e1c47983482083979dd4 (patch) | |
tree | a626ac4443d9845684fe923dc02bf503e627ee68 /lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 0f554492467064b3198df509227a3e902cf7cf1f (diff) | |
download | llvm-34797136cb9fa9f450c0e1c47983482083979dd4.tar.gz llvm-34797136cb9fa9f450c0e1c47983482083979dd4.tar.bz2 llvm-34797136cb9fa9f450c0e1c47983482083979dd4.tar.xz |
Move the TLSModel information into the TargetMachine rather than hiding
in TargetLowering. There was already a FIXME about this location being
odd. The interface is simplified as a consequence. This will also make
it easier to change TLS models when compiling with PIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 03aed3aeca..82a91de2bb 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -39,28 +39,6 @@ static cl::opt<bool> AllowPromoteIntElem("promote-elements", cl::Hidden, cl::init(true), cl::desc("Allow promotion of integer vector element types")); -namespace llvm { -TLSModel::Model getTLSModel(const GlobalValue *GV, Reloc::Model reloc) { - bool isLocal = GV->hasLocalLinkage(); - bool isDeclaration = GV->isDeclaration(); - // FIXME: what should we do for protected and internal visibility? - // For variables, is internal different from hidden? - bool isHidden = GV->hasHiddenVisibility(); - - if (reloc == Reloc::PIC_) { - if (isLocal || isHidden) - return TLSModel::LocalDynamic; - else - return TLSModel::GeneralDynamic; - } else { - if (!isDeclaration || isHidden) - return TLSModel::LocalExec; - else - return TLSModel::InitialExec; - } -} -} - /// InitLibcallNames - Set default libcall names. /// static void InitLibcallNames(const char **Names) { |