aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParsePragma.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-23 21:45:46 +0000
committerChris Lattner <sabre@nondot.org>2008-11-23 21:45:46 +0000
commit08631c5fa053867146b5ee8be658c229f6bf127c (patch)
treee1938ec851a8ca72ade476e71a10797fdacd12a7 /lib/Parse/ParsePragma.cpp
parent011bb4edf731d529da1cbf71c7c2696aaf5a054f (diff)
Convert IdentifierInfo's to be printed the same as DeclarationNames
with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParsePragma.cpp')
-rw-r--r--lib/Parse/ParsePragma.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Parse/ParsePragma.cpp b/lib/Parse/ParsePragma.cpp
index d7ecbfa2b9..17eba03c26 100644
--- a/lib/Parse/ParsePragma.cpp
+++ b/lib/Parse/ParsePragma.cpp
@@ -45,13 +45,13 @@ void PragmaPackHandler::HandlePragma(Preprocessor &PP, Token &PackTok) {
PP.Lex(Tok);
} else if (Tok.is(tok::identifier)) {
const IdentifierInfo *II = Tok.getIdentifierInfo();
- if (II == &PP.getIdentifierTable().get("show")) {
+ if (II->isStr("show")) {
Kind = Action::PPK_Show;
PP.Lex(Tok);
} else {
- if (II == &PP.getIdentifierTable().get("push")) {
+ if (II->isStr("push")) {
Kind = Action::PPK_Push;
- } else if (II == &PP.getIdentifierTable().get("pop")) {
+ } else if (II->isStr("pop")) {
Kind = Action::PPK_Pop;
} else {
PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_invalid_action);
@@ -76,7 +76,7 @@ void PragmaPackHandler::HandlePragma(Preprocessor &PP, Token &PackTok) {
PP.Lex(Tok);
if (Tok.isNot(tok::numeric_constant)) {
- PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed)<<II;
+ PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed);
return;
}
@@ -87,7 +87,7 @@ void PragmaPackHandler::HandlePragma(Preprocessor &PP, Token &PackTok) {
PP.Lex(Tok);
}
} else {
- PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed) << II;
+ PP.Diag(Tok.getLocation(), diag::warn_pragma_pack_malformed);
return;
}
}