summaryrefslogtreecommitdiff
path: root/test/PCH/cxx-required-decls.cpp
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 /test/PCH/cxx-required-decls.cpp
parentf47c944b5710a545d564b4d4b641a2f8bac96af3 (diff)
downloadclang-90e99a84ddd020e8fda79643748243725a2ed071.tar.gz
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 'test/PCH/cxx-required-decls.cpp')
-rw-r--r--test/PCH/cxx-required-decls.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/PCH/cxx-required-decls.cpp b/test/PCH/cxx-required-decls.cpp
index 0e39ce36fe..818958ea1e 100644
--- a/test/PCH/cxx-required-decls.cpp
+++ b/test/PCH/cxx-required-decls.cpp
@@ -6,3 +6,4 @@
// RUN: %clang_cc1 -include-pch %t %s -emit-llvm -o - | FileCheck %s
// CHECK: @_ZL5globS = internal global %struct.S zeroinitializer
+// CHECK: @_ZL3bar = internal global i32 0, align 4