[cfe-commits] r116859 - in /cfe/trunk: lib/AST/Decl.cpp lib/Serialization/ASTWriterDecl.cpp test/PCH/Inputs/chain-cxx1.h test/PCH/Inputs/chain-cxx2.h test/PCH/chain-cxx.cpp
Andrew Trick
atrick at apple.com
Tue Oct 19 14:14:46 PDT 2010
Author: atrick
Date: Tue Oct 19 16:14:46 2010
New Revision: 116859
URL: http://llvm.org/viewvc/llvm-project?rev=116859&view=rev
Log:
Reverting 116836,116837,116838 until we resolve the getLangStandardForKind failures.
Added:
cfe/trunk/test/PCH/Inputs/chain-cxx1.h
- copied unchanged from r116835, cfe/trunk/test/PCH/Inputs/chain-cxx1.h
cfe/trunk/test/PCH/Inputs/chain-cxx2.h
- copied unchanged from r116835, cfe/trunk/test/PCH/Inputs/chain-cxx2.h
Modified:
cfe/trunk/lib/AST/Decl.cpp
cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
cfe/trunk/test/PCH/chain-cxx.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=116859&r1=116858&r2=116859&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Tue Oct 19 16:14:46 2010
@@ -1580,8 +1580,6 @@
TagDecl* TagDecl::getDefinition() const {
if (isDefinition())
return const_cast<TagDecl *>(this);
- if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(this))
- return CXXRD->getDefinition();
for (redecl_iterator R = redecls_begin(), REnd = redecls_end();
R != REnd; ++R)
Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterDecl.cpp?rev=116859&r1=116858&r2=116859&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Tue Oct 19 16:14:46 2010
@@ -1116,13 +1116,13 @@
Abv->Add(BitCodeAbbrevOp(0)); // hasExtInfo
Abv->Add(BitCodeAbbrevOp(serialization::PREDEF_TYPE_NULL_ID)); // InfoType
// VarDecl
- Abv->Add(BitCodeAbbrevOp(0)); // No redeclaration
Abv->Add(BitCodeAbbrevOp(0)); // StorageClass
Abv->Add(BitCodeAbbrevOp(0)); // StorageClassAsWritten
Abv->Add(BitCodeAbbrevOp(0)); // isThreadSpecified
Abv->Add(BitCodeAbbrevOp(0)); // hasCXXDirectInitializer
Abv->Add(BitCodeAbbrevOp(0)); // isExceptionVariable
Abv->Add(BitCodeAbbrevOp(0)); // isNRVOVariable
+ Abv->Add(BitCodeAbbrevOp(0)); // PrevDecl
Abv->Add(BitCodeAbbrevOp(0)); // HasInit
Abv->Add(BitCodeAbbrevOp(0)); // HasMemberSpecializationInfo
// ParmVarDecl
Modified: cfe/trunk/test/PCH/chain-cxx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-cxx.cpp?rev=116859&r1=116858&r2=116859&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-cxx.cpp (original)
+++ cfe/trunk/test/PCH/chain-cxx.cpp Tue Oct 19 16:14:46 2010
@@ -1,77 +1,13 @@
// Test C++ chained PCH functionality
// Without PCH
-// RUN: %clang_cc1 -fsyntax-only -verify -include %s -include %s %s
+// RUN: %clang_cc1 -fsyntax-only -verify -include %S/Inputs/chain-cxx1.h -include %S/Inputs/chain-cxx2.h %s
// With PCH
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t1 %s
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t2 %s -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -x c++ -emit-pch -o %t1 %S/Inputs/chain-cxx1.h
+// RUN: %clang_cc1 -x c++ -emit-pch -o %t2 %S/Inputs/chain-cxx2.h -include-pch %t1 -chained-pch
// RUN: %clang_cc1 -fsyntax-only -verify -include-pch %t2 %s
-#ifndef HEADER1
-#define HEADER1
-//===----------------------------------------------------------------------===//
-// Primary header for C++ chained PCH test
-
-void f();
-
-// Name not appearing in dependent
-void pf();
-
-namespace ns {
- void g();
-
- void pg();
-}
-
-template <typename T>
-struct S { typedef int G; };
-
-// Partially specialize
-template <typename T>
-struct S<T *> { typedef int H; };
-
-//===----------------------------------------------------------------------===//
-#elif not defined(HEADER2)
-#define HEADER2
-//===----------------------------------------------------------------------===//
-// Dependent header for C++ chained PCH test
-
-// Overload function from primary
-void f(int);
-
-// Add function with different name
-void f2();
-
-// Reopen namespace
-namespace ns {
- // Overload function from primary
- void g(int);
-
- // Add different name
- void g2();
-}
-
-// Specialize template from primary
-template <>
-struct S<int> { typedef int I; };
-
-// Partially specialize
-template <typename T>
-struct S<T &> { typedef int J; };
-
-// Specialize previous partial specialization
-template <>
-struct S<int *> { typedef int K; };
-
-// Specialize the partial specialization from this file
-template <>
-struct S<int &> { typedef int L; };
-
-//===----------------------------------------------------------------------===//
-#else
-//===----------------------------------------------------------------------===//
-
void test() {
f();
f(1);
@@ -90,6 +26,3 @@
typedef S<int *>::K T5;
typedef S<int &>::L T6;
}
-
-//===----------------------------------------------------------------------===//
-#endif
More information about the cfe-commits
mailing list