summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/Linkage.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-29 18:15:58 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-07-29 18:15:58 +0000
commit90e99a84ddd020e8fda79643748243725a2ed071 (patch)
tree00518cb5aec108f4b1fd42d7b49a5aa8d9135645 /include/clang/Basic/Linkage.h
parentf47c944b5710a545d564b4d4b641a2f8bac96af3 (diff)
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar. This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext, thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen. This fixes current (and avoids future) codegen-from-PCH bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Linkage.h')
-rw-r--r--include/clang/Basic/Linkage.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Basic/Linkage.h b/include/clang/Basic/Linkage.h
index de0de348d3..035b4fc7a7 100644
--- a/include/clang/Basic/Linkage.h
+++ b/include/clang/Basic/Linkage.h
@@ -41,6 +41,17 @@ enum Linkage {
ExternalLinkage
};
+/// \brief A more specific kind of linkage. This is relevant to CodeGen and
+/// PCH reading.
+enum GVALinkage {
+ GVA_Internal,
+ GVA_C99Inline,
+ GVA_CXXInline,
+ GVA_StrongExternal,
+ GVA_TemplateInstantiation,
+ GVA_ExplicitTemplateInstantiation
+};
+
/// \brief Determine whether the given linkage is semantically
/// external.
inline bool isExternalLinkage(Linkage L) {