diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-01-21 05:43:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-01-21 05:43:40 +0000 |
commit | de15baf1f429b8672effb3e75de6a02e9d3ea9a8 (patch) | |
tree | f7642bdbdd51b9fddb619dca5d44b1d50a3dd16b /clang | |
parent | bc48f32d0ab1e3224ce22db0a6c3eab9c2141805 (diff) | |
download | bcm5719-llvm-de15baf1f429b8672effb3e75de6a02e9d3ea9a8.tar.gz bcm5719-llvm-de15baf1f429b8672effb3e75de6a02e9d3ea9a8.zip |
Remove redundant argument.
llvm-svn: 148628
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Sema/Sema.h | 2 | ||||
-rw-r--r-- | clang/lib/Parse/ParsePragma.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Sema/SemaAttr.cpp | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 48d118a397f..2055f3bf6ac 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -5553,7 +5553,7 @@ public: SourceLocation PragmaLoc); /// ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... . - void ActOnPragmaVisibility(bool IsPush, const IdentifierInfo* VisType, + void ActOnPragmaVisibility(const IdentifierInfo* VisType, SourceLocation PragmaLoc); NamedDecl *DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II, diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp index 2069d31dd27..2fe2f3bdf3c 100644 --- a/clang/lib/Parse/ParsePragma.cpp +++ b/clang/lib/Parse/ParsePragma.cpp @@ -42,13 +42,10 @@ void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, const IdentifierInfo *PushPop = Tok.getIdentifierInfo(); - bool IsPush; const IdentifierInfo *VisType; if (PushPop && PushPop->isStr("pop")) { - IsPush = false; VisType = 0; } else if (PushPop && PushPop->isStr("push")) { - IsPush = true; PP.LexUnexpandedToken(Tok); if (Tok.isNot(tok::l_paren)) { PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) @@ -80,7 +77,7 @@ void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, return; } - Actions.ActOnPragmaVisibility(IsPush, VisType, VisLoc); + Actions.ActOnPragmaVisibility(VisType, VisLoc); } // #pragma pack(...) comes in the following delicious flavors: diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp index 6aae8db3914..0859cb727b5 100644 --- a/clang/lib/Sema/SemaAttr.cpp +++ b/clang/lib/Sema/SemaAttr.cpp @@ -345,9 +345,9 @@ static void PushPragmaVisibility(Sema &S, unsigned type, SourceLocation loc) { Stack->push_back(std::make_pair(type, loc)); } -void Sema::ActOnPragmaVisibility(bool IsPush, const IdentifierInfo* VisType, +void Sema::ActOnPragmaVisibility(const IdentifierInfo* VisType, SourceLocation PragmaLoc) { - if (IsPush) { + if (VisType) { // Compute visibility to use. VisibilityAttr::VisibilityType type; if (VisType->isStr("default")) |