aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-03 13:29:08 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-03 13:29:08 +0000
commit922a2097733e49b869978a264837ad60eca82891 (patch)
tree4075b1f9165f6c8d2b9a7e98b89a1348669f78fe /include
parentec2b103c267a06a66e926f62cd96767b280f5cf5 (diff)
Notes
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/Builtins.def2
-rw-r--r--include/clang/Basic/DiagnosticGroups.td1
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td24
-rw-r--r--include/clang/Frontend/CompileOptions.h13
4 files changed, 25 insertions, 15 deletions
diff --git a/include/clang/AST/Builtins.def b/include/clang/AST/Builtins.def
index 671c4bd6cd4a..11f3264faa2d 100644
--- a/include/clang/AST/Builtins.def
+++ b/include/clang/AST/Builtins.def
@@ -356,7 +356,7 @@ LIBBUILTIN(fprintf, "iP*cC*.", "fp:1:", "stdio.h")
LIBBUILTIN(snprintf, "ic*zcC*.", "fp:2:", "stdio.h")
LIBBUILTIN(sprintf, "ic*cC*.", "fp:1:", "stdio.h")
LIBBUILTIN(vprintf, "icC*a", "fP:0:", "stdio.h")
-LIBBUILTIN(vfprintf, "iP*cC*a", "fP:1:", "stdio.h")
+LIBBUILTIN(vfprintf, "i.", "fP:1:", "stdio.h")
LIBBUILTIN(vsnprintf, "ic*zcC*a", "fP:2:", "stdio.h")
LIBBUILTIN(vsprintf, "ic*cC*a", "fP:1:", "stdio.h")
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 700826fa658f..7c6b090a33a0 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -30,6 +30,7 @@ def : DiagGroup<"conversion">;
def : DiagGroup<"declaration-after-statement">;
def : DiagGroup<"disabled-optimization">;
def : DiagGroup<"discard-qual">;
+def EmptyBody : DiagGroup<"empty-body">;
def ExtraTokens : DiagGroup<"extra-tokens">;
def FormatExtraArgs : DiagGroup<"format-extra-args">;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 672e473678dd..41e73c178870 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -909,13 +909,13 @@ def err_array_init_list_required : Error<
"initialization with '{...}' expected for array">;
def err_excess_initializers : Error<
"excess elements in %select{array|vector|scalar|union|struct}0 initializer">;
-def warn_excess_initializers : Warning<
+def warn_excess_initializers : ExtWarn<
"excess elements in %select{array|vector|scalar|union|struct}0 initializer">;
def err_excess_initializers_in_char_array_initializer : Error<
"excess elements in char array initializer">;
-def warn_excess_initializers_in_char_array_initializer : Warning<
+def warn_excess_initializers_in_char_array_initializer : ExtWarn<
"excess elements in char array initializer">;
-def warn_initializer_string_for_char_array_too_long : Warning<
+def warn_initializer_string_for_char_array_too_long : ExtWarn<
"initializer-string for char array is too long">;
def warn_braces_around_scalar_init : Warning<
"braces around scalar initializer">;
@@ -1029,7 +1029,7 @@ def err_offsetof_record_type : Error<
def err_offsetof_array_type : Error<"offsetof requires array type, %0 invalid">;
def ext_offsetof_extended_field_designator : Extension<
"using extended field designator is an extension">;
-def warn_offsetof_non_pod_type : Warning<"offset of on non-POD type %0">,
+def warn_offsetof_non_pod_type : ExtWarn<"offset of on non-POD type %0">,
InGroup<InvalidOffsetof>;
def warn_floatingpoint_eq : Warning<
@@ -1130,11 +1130,11 @@ def err_typecheck_sub_ptr_object : Error<
"subtraction of pointer %0 requires pointee to be a complete object type">;
def err_typecheck_sub_ptr_compatible : Error<
"%0 and %1 are not pointers to compatible types">;
-def ext_typecheck_comparison_of_pointer_integer : Warning<
+def ext_typecheck_comparison_of_pointer_integer : ExtWarn<
"comparison between pointer and integer (%0 and %1)">;
-def ext_typecheck_comparison_of_distinct_pointers : Warning<
+def ext_typecheck_comparison_of_distinct_pointers : ExtWarn<
"comparison of distinct pointer types (%0 and %1)">;
-def ext_typecheck_cond_incompatible_operands : Warning<
+def ext_typecheck_cond_incompatible_operands : ExtWarn<
"incompatible operand types (%0 and %1)">;
def err_typecheck_comparison_of_distinct_pointers : Error<
"comparison of distinct pointer types (%0 and %1)">;
@@ -1443,9 +1443,9 @@ def err_typecheck_cond_incompatible_operands : Error<
"incompatible operand types (%0 and %1)">;
def err_cast_selector_expr : Error<
"cannot type cast @selector expression">;
-def warn_typecheck_cond_incompatible_pointers : Warning<
+def warn_typecheck_cond_incompatible_pointers : ExtWarn<
"pointer type mismatch (%0 and %1)">;
-def warn_typecheck_cond_pointer_integer_mismatch : Warning<
+def warn_typecheck_cond_pointer_integer_mismatch : ExtWarn<
"pointer/integer type mismatch in conditional expression (%0 and %1)">;
def err_typecheck_choose_expr_requires_constant : Error<
"'__builtin_choose_expr' requires a constant expression">;
@@ -1717,7 +1717,7 @@ def err_typecheck_statement_requires_integer : Error<
def err_multiple_default_labels_defined : Error<
"multiple default labels in one switch">;
def warn_empty_if_body : Warning<
- "if statement has empty body">;
+ "if statement has empty body">, InGroup<EmptyBody>;
def err_va_start_used_in_non_variadic_function : Error<
"'va_start' used in function with fixed args">;
def warn_second_parameter_of_va_start_not_last_named_argument : Warning<
@@ -1789,9 +1789,9 @@ def ext_invalid_sign_spec : Extension<"'%0' cannot be signed or unsigned">;
def warn_receiver_forward_class : Warning<
"receiver %0 is a forward class and corresponding @interface may not exist">;
def note_method_sent_forward_class : Note<"method %0 is used for the forward class">;
-def warn_missing_declspec : Warning<
+def ext_missing_declspec : ExtWarn<
"declaration specifier missing, defaulting to 'int'">;
-def warn_missing_type_specifier : Warning<
+def ext_missing_type_specifier : ExtWarn<
"type specifier missing, defaults to 'int'">,
InGroup<ImplicitInt>;
def err_decimal_unsupported : Error<
diff --git a/include/clang/Frontend/CompileOptions.h b/include/clang/Frontend/CompileOptions.h
index 1af5e48ea119..34815c8cb54f 100644
--- a/include/clang/Frontend/CompileOptions.h
+++ b/include/clang/Frontend/CompileOptions.h
@@ -23,12 +23,17 @@ namespace clang {
/// is optimized and passed to the backend.
class CompileOptions {
public:
+ enum InliningMethod {
+ NoInlining, // Perform no inlining whatsoever.
+ NormalInlining, // Use the standard function inlining pass.
+ OnlyAlwaysInlining // Only run the always inlining pass.
+ };
+
unsigned OptimizationLevel : 3; /// The -O[0-4] option specified.
unsigned OptimizeSize : 1; /// If -Os is specified.
unsigned DebugInfo : 1; /// Should generate deubg info (-g).
unsigned UnitAtATime : 1; /// Unused. For mirroring GCC
/// optimization selection.
- unsigned InlineFunctions : 1; /// Should functions be inlined?
unsigned SimplifyLibCalls : 1; /// Should standard library calls be
/// treated specially.
unsigned UnrollLoops : 1; /// Control whether loops are unrolled.
@@ -37,6 +42,9 @@ public:
unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
unsigned NoCommon : 1; /// Set when -fno-common or C++ is enabled.
+ /// Inlining - The kind of inlining to perform.
+ InliningMethod Inlining;
+
/// CPU - An optional CPU to target.
std::string CPU;
@@ -50,10 +58,11 @@ public:
OptimizeSize = 0;
DebugInfo = 0;
UnitAtATime = 1;
- InlineFunctions = SimplifyLibCalls = UnrollLoops = 0;
+ SimplifyLibCalls = UnrollLoops = 0;
VerifyModule = 1;
TimePasses = 0;
NoCommon = 0;
+ Inlining = NoInlining;
}
};