summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2015-07-20 22:57:31 +0000
committerBob Wilson <bob.wilson@apple.com>2015-07-20 22:57:31 +0000
commit7c73083bd3d7b9be23004a97259b630ae563b6d2 (patch)
treea5a6a9d367e1223f10db20c823a89538ecfc096a /clang/lib/Basic
parent1f982c2d22e51166b6b08d6929abb0278bf3dde7 (diff)
downloadbcm5719-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/Basic')
-rw-r--r--clang/lib/Basic/Attributes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/Attributes.cpp b/clang/lib/Basic/Attributes.cpp
index da9ac793f16..c215366fc39 100644
--- a/clang/lib/Basic/Attributes.cpp
+++ b/clang/lib/Basic/Attributes.cpp
@@ -4,8 +4,8 @@
using namespace clang;
int clang::hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope,
- const IdentifierInfo *Attr, const llvm::Triple &T,
- const LangOptions &LangOpts) {
+ const IdentifierInfo *Attr, const TargetInfo &Target,
+ const LangOptions &LangOpts) {
StringRef Name = Attr->getName();
// Normalize the attribute name, __foo__ becomes foo.
if (Name.size() >= 4 && Name.startswith("__") && Name.endswith("__"))
OpenPOWER on IntegriCloud