diff options
author | Reid Kleckner <rnk@google.com> | 2019-11-22 14:55:49 -0800 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-11-22 15:47:46 -0800 |
commit | 2692eb0b86c8f7ae1299d2e032f2778bb6e0a224 (patch) | |
tree | cd1ce6fc5288141158e10130c73a8f3ae4a9bc67 /clang/lib/Sema/SemaAttr.cpp | |
parent | b6ae524cd2d5139748e207d4b60b4a900775d6a7 (diff) | |
download | bcm5719-llvm-2692eb0b86c8f7ae1299d2e032f2778bb6e0a224.tar.gz bcm5719-llvm-2692eb0b86c8f7ae1299d2e032f2778bb6e0a224.zip |
Move vtordisp mode from Attr class to LangOptions.h, NFC
This removes one of the two uses of Attr.h in DeclCXX.h, reducing the
need to include Attr.h as widely. LangOptions is already very popular.
Diffstat (limited to 'clang/lib/Sema/SemaAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaAttr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp index 70186c966f8..cd2a65276b0 100644 --- a/clang/lib/Sema/SemaAttr.cpp +++ b/clang/lib/Sema/SemaAttr.cpp @@ -80,9 +80,9 @@ void Sema::AddMsStructLayoutForRecord(RecordDecl *RD) { // FIXME: We should merge AddAlignmentAttributesForRecord with // AddMsStructLayoutForRecord into AddPragmaAttributesForRecord, which takes // all active pragmas and applies them as attributes to class definitions. - if (VtorDispStack.CurrentValue != getLangOpts().VtorDispMode) - RD->addAttr( - MSVtorDispAttr::CreateImplicit(Context, VtorDispStack.CurrentValue)); + if (VtorDispStack.CurrentValue != getLangOpts().getVtorDispMode()) + RD->addAttr(MSVtorDispAttr::CreateImplicit( + Context, unsigned(VtorDispStack.CurrentValue))); } template <typename Attribute> @@ -416,7 +416,7 @@ void Sema::ActOnPragmaMSPointersToMembers( void Sema::ActOnPragmaMSVtorDisp(PragmaMsStackAction Action, SourceLocation PragmaLoc, - MSVtorDispAttr::Mode Mode) { + MSVtorDispMode Mode) { if (Action & PSK_Pop && VtorDispStack.Stack.empty()) Diag(PragmaLoc, diag::warn_pragma_pop_failed) << "vtordisp" << "stack empty"; |