diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-06-29 15:27:35 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-06-29 15:27:35 +0000 |
commit | fe8ec01bba74f6841576a2ee93d2c62cdfa4eff2 (patch) | |
tree | 4096f1789f612b6c52a261f672099ef576bb6bb7 /lib/AST/RecordLayoutBuilder.cpp | |
parent | 9c254f0415bef9a0bafe5b5026ddb54b727597b1 (diff) |
Delete assert in ComputeKeyFunction. The function runs fine without it, since
there's an explicit guard on isPolymorphic, and virtual bases don't affect the
key function calculation. This allows people to call
ASTContext::getKeyFunction on arbitrary classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/RecordLayoutBuilder.cpp')
-rw-r--r-- | lib/AST/RecordLayoutBuilder.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index 1f04cb80e1..275daf6bb2 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -1415,8 +1415,6 @@ void RecordLayoutBuilder::UpdateAlignment(unsigned NewAlignment) { const CXXMethodDecl * RecordLayoutBuilder::ComputeKeyFunction(const CXXRecordDecl *RD) { - assert(RD->isDynamicClass() && "Class does not have any virtual methods!"); - // If a class isn't polymorphic it doesn't have a key function. if (!RD->isPolymorphic()) return 0; |