diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /lib/Sema/SemaAttr.cpp | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index a7d606d..7629797 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -360,18 +360,18 @@ void Sema::PragmaStack<ValueType>::Act(SourceLocation PragmaLocation, } } -bool Sema::UnifySection(const StringRef &SectionName, +bool Sema::UnifySection(StringRef SectionName, int SectionFlags, DeclaratorDecl *Decl) { - auto Section = SectionInfos.find(SectionName); - if (Section == SectionInfos.end()) { - SectionInfos[SectionName] = - SectionInfo(Decl, SourceLocation(), SectionFlags); + auto Section = Context.SectionInfos.find(SectionName); + if (Section == Context.SectionInfos.end()) { + Context.SectionInfos[SectionName] = + ASTContext::SectionInfo(Decl, SourceLocation(), SectionFlags); return false; } // A pre-declared section takes precedence w/o diagnostic. if (Section->second.SectionFlags == SectionFlags || - !(Section->second.SectionFlags & PSF_Implicit)) + !(Section->second.SectionFlags & ASTContext::PSF_Implicit)) return false; auto OtherDecl = Section->second.Decl; Diag(Decl->getLocation(), diag::err_section_conflict) @@ -384,17 +384,17 @@ bool Sema::UnifySection(const StringRef &SectionName, if (auto A = OtherDecl->getAttr<SectionAttr>()) if (A->isImplicit()) Diag(A->getLocation(), diag::note_pragma_entered_here); - return false; + return true; } -bool Sema::UnifySection(const StringRef &SectionName, +bool Sema::UnifySection(StringRef SectionName, int SectionFlags, SourceLocation PragmaSectionLocation) { - auto Section = SectionInfos.find(SectionName); - if (Section != SectionInfos.end()) { + auto Section = Context.SectionInfos.find(SectionName); + if (Section != Context.SectionInfos.end()) { if (Section->second.SectionFlags == SectionFlags) return false; - if (!(Section->second.SectionFlags & PSF_Implicit)) { + if (!(Section->second.SectionFlags & ASTContext::PSF_Implicit)) { Diag(PragmaSectionLocation, diag::err_section_conflict) << "this" << "a prior #pragma section"; Diag(Section->second.PragmaSectionLocation, @@ -402,8 +402,8 @@ bool Sema::UnifySection(const StringRef &SectionName, return true; } } - SectionInfos[SectionName] = - SectionInfo(nullptr, PragmaSectionLocation, SectionFlags); + Context.SectionInfos[SectionName] = + ASTContext::SectionInfo(nullptr, PragmaSectionLocation, SectionFlags); return false; } |