Exclude private decls from interface token hash.

After parsing a private decl, reset the token hash state to what it was
before the decl was parsed. This way, adding a private decl or editing
its type or name will not trigger a rebuild of downstream files.

<rdar://problem/22239821> Modifying private APIs shouldn't cause dependents to recompile

Swift SVN r31358
This commit is contained in:
Chris Willmore
2015-08-20 03:43:43 +00:00
parent c33e3efe59
commit 0e326dbeeb
4 changed files with 69 additions and 0 deletions

View File

@@ -1083,6 +1083,9 @@ public:
InterfaceHash.update(a);
}
const llvm::MD5 &getInterfaceHashState() { return InterfaceHash; }
void setInterfaceHashState(const llvm::MD5 &state) { InterfaceHash = state; }
void getInterfaceHash(llvm::SmallString<32> &str) {
llvm::MD5::MD5Result result;
InterfaceHash.final(result);