summaryrefslogtreecommitdiffstats
path: root/lib/Basic/Attributes.cpp
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
commit4e5f9fb46e1bfcb4ec1831785225496c5e11f413 (patch)
tree4b1e5226bfa01f4195c84afb1463cb3433e26a97 /lib/Basic/Attributes.cpp
parentf3e8e6409f7fdf07b2d058dcb797b019ec2595a2 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Attributes.cpp')
-rw-r--r--lib/Basic/Attributes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Basic/Attributes.cpp b/lib/Basic/Attributes.cpp
index da9ac793f1..c215366fc3 100644
--- a/lib/Basic/Attributes.cpp
+++ b/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("__"))