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: |
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. |
7877 if (FD->isMSExternInline()) |
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: |
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 --- |