Improvements to the FunctionDecl getters/setters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71800 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 319d4d5..c62c1e2 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -123,12 +123,12 @@
SourceLocation L,
DeclarationName N, QualType T,
StorageClass S, bool isInline,
- bool hasPrototype,
+ bool hasWrittenPrototype,
SourceLocation TypeSpecStartLoc) {
FunctionDecl *New
= new (C) FunctionDecl(Function, DC, L, N, T, S, isInline,
TypeSpecStartLoc);
- New->HasPrototype = hasPrototype;
+ New->HasWrittenPrototype = hasWrittenPrototype;
return New;
}
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index 9dd1565..45af36c 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -151,8 +151,8 @@
FD->setC99InlineDefinition(Record[Idx++]);
FD->setVirtual(Record[Idx++]);
FD->setPure(Record[Idx++]);
- FD->setInheritedPrototype(Record[Idx++]);
- FD->setHasPrototype(Record[Idx++]);
+ FD->setHasInheritedPrototype(Record[Idx++]);
+ FD->setHasWrittenPrototype(Record[Idx++]);
FD->setDeleted(Record[Idx++]);
FD->setTypeSpecStartLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
// FIXME: C++ TemplateOrInstantiation
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index 96045f9..48c7dc2 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -151,8 +151,8 @@
Record.push_back(D->isC99InlineDefinition());
Record.push_back(D->isVirtual());
Record.push_back(D->isPure());
- Record.push_back(D->inheritedPrototype());
- Record.push_back(D->hasPrototype() && !D->inheritedPrototype());
+ Record.push_back(D->hasInheritedPrototype());
+ Record.push_back(D->hasWrittenPrototype());
Record.push_back(D->isDeleted());
Writer.AddSourceLocation(D->getTypeSpecStartLoc(), Record);
// FIXME: C++ TemplateOrInstantiation
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 20b24d1..1c464d1 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -736,7 +736,7 @@
OldProto->isVariadic(),
OldProto->getTypeQuals());
New->setType(NewQType);
- New->setInheritedPrototype();
+ New->setHasInheritedPrototype();
// Synthesize a parameter for each argument type.
llvm::SmallVector<ParmVarDecl*, 16> Params;