ASTContext.cpp (280031) | ASTContext.cpp (283526) |
---|---|
1//===--- ASTContext.cpp - Context to hold long-lived AST nodes ------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 668 unchanged lines hidden (view full) --- 677CXXABI *ASTContext::createCXXABI(const TargetInfo &T) { 678 if (!LangOpts.CPlusPlus) return nullptr; 679 680 switch (T.getCXXABI().getKind()) { 681 case TargetCXXABI::GenericARM: // Same as Itanium at this level 682 case TargetCXXABI::iOS: 683 case TargetCXXABI::iOS64: 684 case TargetCXXABI::GenericAArch64: | 1//===--- ASTContext.cpp - Context to hold long-lived AST nodes ------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 668 unchanged lines hidden (view full) --- 677CXXABI *ASTContext::createCXXABI(const TargetInfo &T) { 678 if (!LangOpts.CPlusPlus) return nullptr; 679 680 switch (T.getCXXABI().getKind()) { 681 case TargetCXXABI::GenericARM: // Same as Itanium at this level 682 case TargetCXXABI::iOS: 683 case TargetCXXABI::iOS64: 684 case TargetCXXABI::GenericAArch64: |
685 case TargetCXXABI::GenericMIPS: |
|
685 case TargetCXXABI::GenericItanium: 686 return CreateItaniumCXXABI(*this); 687 case TargetCXXABI::Microsoft: 688 return CreateMicrosoftCXXABI(*this); 689 } 690 llvm_unreachable("Invalid CXXABI type!"); 691} 692 --- 7175 unchanged lines hidden (view full) --- 7868 7869 // C99 inline semantics, where the symbol is not externally visible. 7870 return GVA_AvailableExternally; 7871 } 7872 7873 // Functions specified with extern and inline in -fms-compatibility mode 7874 // forcibly get emitted. While the body of the function cannot be later 7875 // replaced, the function definition cannot be discarded. | 686 case TargetCXXABI::GenericItanium: 687 return CreateItaniumCXXABI(*this); 688 case TargetCXXABI::Microsoft: 689 return CreateMicrosoftCXXABI(*this); 690 } 691 llvm_unreachable("Invalid CXXABI type!"); 692} 693 --- 7175 unchanged lines hidden (view full) --- 7869 7870 // C99 inline semantics, where the symbol is not externally visible. 7871 return GVA_AvailableExternally; 7872 } 7873 7874 // Functions specified with extern and inline in -fms-compatibility mode 7875 // forcibly get emitted. While the body of the function cannot be later 7876 // replaced, the function definition cannot be discarded. |
7876 if (FD->getMostRecentDecl()->isMSExternInline()) | 7877 if (FD->isMSExternInline()) |
7877 return GVA_StrongODR; 7878 7879 return GVA_DiscardableODR; 7880} 7881 7882static GVALinkage adjustGVALinkageForDLLAttribute(GVALinkage L, const Decl *D) { 7883 // See http://msdn.microsoft.com/en-us/library/xa0d9ste.aspx 7884 // dllexport/dllimport on inline functions. --- 174 unchanged lines hidden (view full) --- 8059 return VTContext.get(); 8060} 8061 8062MangleContext *ASTContext::createMangleContext() { 8063 switch (Target->getCXXABI().getKind()) { 8064 case TargetCXXABI::GenericAArch64: 8065 case TargetCXXABI::GenericItanium: 8066 case TargetCXXABI::GenericARM: | 7878 return GVA_StrongODR; 7879 7880 return GVA_DiscardableODR; 7881} 7882 7883static GVALinkage adjustGVALinkageForDLLAttribute(GVALinkage L, const Decl *D) { 7884 // See http://msdn.microsoft.com/en-us/library/xa0d9ste.aspx 7885 // dllexport/dllimport on inline functions. --- 174 unchanged lines hidden (view full) --- 8060 return VTContext.get(); 8061} 8062 8063MangleContext *ASTContext::createMangleContext() { 8064 switch (Target->getCXXABI().getKind()) { 8065 case TargetCXXABI::GenericAArch64: 8066 case TargetCXXABI::GenericItanium: 8067 case TargetCXXABI::GenericARM: |
8068 case TargetCXXABI::GenericMIPS: |
|
8067 case TargetCXXABI::iOS: 8068 case TargetCXXABI::iOS64: 8069 return ItaniumMangleContext::create(*this, getDiagnostics()); 8070 case TargetCXXABI::Microsoft: 8071 return MicrosoftMangleContext::create(*this, getDiagnostics()); 8072 } 8073 llvm_unreachable("Unsupported ABI"); 8074} --- 292 unchanged lines hidden --- | 8069 case TargetCXXABI::iOS: 8070 case TargetCXXABI::iOS64: 8071 return ItaniumMangleContext::create(*this, getDiagnostics()); 8072 case TargetCXXABI::Microsoft: 8073 return MicrosoftMangleContext::create(*this, getDiagnostics()); 8074 } 8075 llvm_unreachable("Unsupported ABI"); 8076} --- 292 unchanged lines hidden --- |