summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-07-28 23:57:15 +0000
committerMike Stump <mrs@apple.com>2009-07-28 23:57:15 +0000
commit93246cc475feef16a226abdf238f3436921985f2 (patch)
treecadc4c3712b550341f99dc1ad8fab41a4b6f4efd
parent0830980141389e2aaa01d0280ca5d22c67b4a65b (diff)
downloadbcm5719-llvm-93246cc475feef16a226abdf238f3436921985f2.tar.gz
bcm5719-llvm-93246cc475feef16a226abdf238f3436921985f2.zip
Some minor cleanups, thanks Chris.
llvm-svn: 77402
-rw-r--r--clang/include/clang/AST/ASTContext.h5
-rw-r--r--clang/lib/AST/ASTContext.cpp16
-rw-r--r--clang/lib/Sema/SemaDecl.cpp10
3 files changed, 10 insertions, 21 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 96ffcc7c4eb..60aead7e331 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -589,9 +589,8 @@ public:
enum GetBuiltinTypeError {
GE_None, //< No error
- GE_Missing_FILE, //< Missing the FILE type from <stdio.h>
- GE_Missing_jmp_buf, //< Missing the jmp_buf type from <setjmp.h>
- GE_Missing_sigjmp_buf //< Missing the sigjmp_buf type from <setjmp.h>
+ GE_Missing_stdio, //< Missing a type from <stdio.h>
+ GE_Missing_setjmp //< Missing a type from <setjmp.h>
};
/// GetBuiltinType - Return the type for the specified builtin.
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 4da20f5a60d..931010d9046 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -3976,22 +3976,18 @@ static QualType DecodeTypeFromStr(const char *&Str, ASTContext &Context,
case 'P':
Type = Context.getFILEType();
if (Type.isNull()) {
- Error = ASTContext::GE_Missing_FILE;
+ Error = ASTContext::GE_Missing_stdio;
return QualType();
}
break;
case 'J':
- if (Signed) {
+ if (Signed)
Type = Context.getsigjmp_bufType();
- if (Type.isNull()) {
- Error = ASTContext::GE_Missing_sigjmp_buf;
- return QualType();
- }
- break;
- }
- Type = Context.getjmp_bufType();
+ else
+ Type = Context.getjmp_bufType();
+
if (Type.isNull()) {
- Error = ASTContext::GE_Missing_jmp_buf;
+ Error = ASTContext::GE_Missing_setjmp;
return QualType();
}
break;
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index c6fb6d97bdf..5f405b24308 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -448,19 +448,13 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned bid,
// Okay
break;
- case ASTContext::GE_Missing_FILE:
+ case ASTContext::GE_Missing_stdio:
if (ForRedeclaration)
Diag(Loc, diag::err_implicit_decl_requires_stdio)
<< Context.BuiltinInfo.GetName(BID);
return 0;
- case ASTContext::GE_Missing_jmp_buf:
- if (ForRedeclaration)
- Diag(Loc, diag::err_implicit_decl_requires_setjmp)
- << Context.BuiltinInfo.GetName(BID);
- return 0;
-
- case ASTContext::GE_Missing_sigjmp_buf:
+ case ASTContext::GE_Missing_setjmp:
if (ForRedeclaration)
Diag(Loc, diag::err_implicit_decl_requires_setjmp)
<< Context.BuiltinInfo.GetName(BID);
OpenPOWER on IntegriCloud