File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed
Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -1095,8 +1095,6 @@ void ASTDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
10951095 Record.AddStmt (D->getUninstantiatedDefaultArg ());
10961096 Code = serialization::DECL_PARM_VAR;
10971097
1098- assert (!D->isARCPseudoStrong ()); // can be true of ImplicitParamDecl
1099-
11001098 // If the assumptions about the DECL_PARM_VAR abbrev are true, use it. Here
11011099 // we dynamically check for the properties that we optimize for, but don't
11021100 // know are true of all PARM_VAR_DECLs.
@@ -2096,7 +2094,7 @@ void ASTWriter::WriteDeclAbbrevs() {
20962094 Abv->Add (BitCodeAbbrevOp (0 )); // SClass
20972095 Abv->Add (BitCodeAbbrevOp (0 )); // TSCSpec
20982096 Abv->Add (BitCodeAbbrevOp (0 )); // InitStyle
2099- Abv->Add (BitCodeAbbrevOp (0 )); // ARCPseudoStrong
2097+ Abv->Add (BitCodeAbbrevOp (BitCodeAbbrevOp::Fixed, 1 )); // isARCPseudoStrong
21002098 Abv->Add (BitCodeAbbrevOp (0 )); // Linkage
21012099 Abv->Add (BitCodeAbbrevOp (0 )); // HasInit
21022100 Abv->Add (BitCodeAbbrevOp (0 )); // HasMemberSpecializationInfo
Original file line number Diff line number Diff line change 1+ // Test for assertion failure due to objc_externally_retained on a function.
2+
3+ // Without PCH
4+ // RUN: %clang_cc1 -fsyntax-only -verify -fobjc-arc -include %s %s
5+
6+ // With PCH
7+ // RUN: %clang_cc1 %s -emit-pch -fobjc-arc -o %t
8+ // RUN: %clang_cc1 -emit-llvm-only -verify %s -fobjc-arc -include-pch %t -debug-info-kind=limited
9+
10+ // expected-no-diagnostics
11+
12+ #ifndef HEADER
13+ #define HEADER
14+ // ===----------------------------------------------------------------------===//
15+ // Header
16+
17+ __attribute__ ((objc_externally_retained)) void doSomething(id someObject);
18+
19+ id sharedObject = 0 ;
20+
21+ // ===----------------------------------------------------------------------===//
22+ #else
23+ // ===----------------------------------------------------------------------===//
24+
25+ void callDoSomething () {
26+ doSomething (sharedObject);
27+ }
28+
29+ // ===----------------------------------------------------------------------===//
30+ #endif
You can’t perform that action at this time.
0 commit comments