diff options
author | Bob Wilson <bob.wilson@apple.com> | 2015-07-20 22:57:31 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2015-07-20 22:57:31 +0000 |
commit | 7c73083bd3d7b9be23004a97259b630ae563b6d2 (patch) | |
tree | a5a6a9d367e1223f10db20c823a89538ecfc096a /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 1f982c2d22e51166b6b08d6929abb0278bf3dde7 (diff) | |
download | bcm5719-llvm-7c73083bd3d7b9be23004a97259b630ae563b6d2.tar.gz bcm5719-llvm-7c73083bd3d7b9be23004a97259b630ae563b6d2.zip |
Ignore the "novtable" declspec when not using the Microsoft C++ ABI.
Clang used to silently ignore __declspec(novtable). It is implemented
now, but leaving the vtable uninitialized does not work when using the
Itanium ABI, where the class layout for complex class hierarchies is
stored in the vtable. It might be possible to honor the novtable
attribute in some simple cases and either report an error or ignore
it in more complex situations, but it’s not clear if that would be
worthwhile. There is also value in having a simple and predictable
behavior, so this changes clang to simply ignore novtable when not using
the Microsoft C++ ABI.
llvm-svn: 242730
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 9ec3356d048..3395381b6a3 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -4583,7 +4583,7 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, // which do not apply to the current target architecture are treated as // though they were unknown attributes. if (Attr.getKind() == AttributeList::UnknownAttribute || - !Attr.existsInTarget(S.Context.getTargetInfo().getTriple())) { + !Attr.existsInTarget(S.Context.getTargetInfo())) { S.Diag(Attr.getLoc(), Attr.isDeclspecAttribute() ? diag::warn_unhandled_ms_attribute_ignored : diag::warn_unknown_attribute_ignored) |