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 | e28342c4013c6646315d854adfc46defaf8a37e7 (patch) | |
tree | c484c253c3e84ef579632b5103339c423be7fe3b /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 73fd2728b945c68371a8dd06dda19162fb58f2d4 (diff) | |
download | bcm5719-llvm-e28342c4013c6646315d854adfc46defaf8a37e7.tar.gz bcm5719-llvm-e28342c4013c6646315d854adfc46defaf8a37e7.zip |
minor refactoring of -fapple-kext stuff.
llvm-svn: 124837
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 150d0c46abc..a086badfa87 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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 { |