diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-07-07 06:38:20 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-07-07 06:38:20 +0000 |
commit | a9a1c68a1bcba94f8d5c6cf5ea5619b0e2eedfce (patch) | |
tree | 9960c190d3d42c07bfb00db452e60687b3784cd9 /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | f456e442114973b8f0866f88c694bf0b6697a7ca (diff) | |
download | bcm5719-llvm-a9a1c68a1bcba94f8d5c6cf5ea5619b0e2eedfce.tar.gz bcm5719-llvm-a9a1c68a1bcba94f8d5c6cf5ea5619b0e2eedfce.zip |
Fix an iterator invalidation issue: deserializing a key function can write to
the key functions table. Don't hold references to anything within that table
across such an access.
llvm-svn: 212437
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index beffe06590c..d8495da1bac 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1479,6 +1479,9 @@ ASTDeclReader::VisitCXXRecordDeclImpl(CXXRecordDecl *D) { if (WasDefinition) { DeclID KeyFn = ReadDeclID(Record, Idx); if (KeyFn && D->IsCompleteDefinition) + // FIXME: This is wrong for the ARM ABI, where some other module may have + // made this function no longer be a key function. We need an update + // record or similar for that case. C.KeyFunctions[D] = KeyFn; } |