diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-04 00:32:39 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-02-04 00:32:39 +0000 |
commit | 53bad4e98ed5e765df4231099bf1c737582908bf (patch) | |
tree | 6dbfcdc52157012a72ea4783adaf30456e424b48 /lib/CodeGen/CodeGenModule.cpp | |
parent | fd0f89d3d7e4220327abdec1cb115474d70219dc (diff) |
minor refactoring of -fapple-kext stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 150d0c46ab..a086badfa8 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1119,6 +1119,9 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { } } + if (Context.getLangOptions().AppleKext) + return llvm::Function::InternalLinkage; + switch (RD->getTemplateSpecializationKind()) { case TSK_Undeclared: case TSK_ExplicitSpecialization: @@ -1127,19 +1130,14 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { // breaks LLVM's build due to undefined symbols. // return llvm::GlobalVariable::AvailableExternallyLinkage; case TSK_ExplicitInstantiationDeclaration: - break; + return llvm::GlobalVariable::LinkOnceODRLinkage; case TSK_ExplicitInstantiationDefinition: - return !Context.getLangOptions().AppleKext ? - llvm::GlobalVariable::WeakODRLinkage : - llvm::Function::InternalLinkage; - + return llvm::GlobalVariable::WeakODRLinkage; } // Silence GCC warning. - return !Context.getLangOptions().AppleKext ? - llvm::GlobalVariable::LinkOnceODRLinkage : - llvm::Function::InternalLinkage; + return llvm::GlobalVariable::LinkOnceODRLinkage; } CharUnits CodeGenModule::GetTargetTypeStoreSize(const llvm::Type *Ty) const { |