aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-06 06:51:12 +0000
committerChris Lattner <sabre@nondot.org>2008-10-06 06:51:12 +0000
commit6b47561af738b33c55c60776c3b095f049902308 (patch)
treee86c7d6c996fa4845e36bca7148626041dad4015
parent45b6b9d080ac56917337d73d8f1cd6374b27b05d (diff)
Remove the 'C' / isConstantExpr flag on builtins. Code should never
depend on the value of this flag, it should depend on whether tryEvaluate is able to *actually* fold a builtin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57160 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Builtins.def19
-rw-r--r--include/clang/AST/Builtins.h6
2 files changed, 9 insertions, 16 deletions
diff --git a/include/clang/AST/Builtins.def b/include/clang/AST/Builtins.def
index c993a75377..d23cc14eb9 100644
--- a/include/clang/AST/Builtins.def
+++ b/include/clang/AST/Builtins.def
@@ -52,16 +52,15 @@
// n -> nothrow
// c -> const
// F -> this is a libc/libm function with a '__builtin_' prefix added.
-// C -> this builtin can be used as a "constant expression"
// FIXME: gcc has nonnull
// Standard libc/libm functions:
-BUILTIN(__builtin_huge_val, "d", "ncC")
-BUILTIN(__builtin_huge_valf, "f", "ncC")
-BUILTIN(__builtin_huge_vall, "Ld", "ncC")
-BUILTIN(__builtin_inf , "d" , "ncC")
-BUILTIN(__builtin_inff , "f" , "ncC")
-BUILTIN(__builtin_infl , "Ld" , "ncC")
+BUILTIN(__builtin_huge_val, "d", "nc")
+BUILTIN(__builtin_huge_valf, "f", "nc")
+BUILTIN(__builtin_huge_vall, "Ld", "nc")
+BUILTIN(__builtin_inf , "d" , "nc")
+BUILTIN(__builtin_inff , "f" , "nc")
+BUILTIN(__builtin_infl , "Ld" , "nc")
BUILTIN(__builtin_nan, "dcC*" , "ncF")
BUILTIN(__builtin_nanf, "fcC*" , "ncF")
BUILTIN(__builtin_nanl, "LdcC*", "ncF")
@@ -112,9 +111,9 @@ BUILTIN(__builtin_bswap32, "UiUi", "nc")
BUILTIN(__builtin_bswap64, "ULLiULLi", "nc")
// Random GCC builtins
-BUILTIN(__builtin_constant_p, "UsUs", "ncC")
-BUILTIN(__builtin_classify_type, "i.", "ncC")
-BUILTIN(__builtin___CFStringMakeConstantString, "FC*cC*", "ncC")
+BUILTIN(__builtin_constant_p, "UsUs", "nc")
+BUILTIN(__builtin_classify_type, "i.", "nc")
+BUILTIN(__builtin___CFStringMakeConstantString, "FC*cC*", "nc")
BUILTIN(__builtin_va_start, "va&.", "n")
BUILTIN(__builtin_va_end, "va&", "n")
BUILTIN(__builtin_va_copy, "va&a", "n")
diff --git a/include/clang/AST/Builtins.h b/include/clang/AST/Builtins.h
index 10805fa0fa..7da9a5f26a 100644
--- a/include/clang/AST/Builtins.h
+++ b/include/clang/AST/Builtins.h
@@ -78,12 +78,6 @@ public:
return strchr(GetRecord(ID).Attributes, 'F') != 0;
}
- /// isConstantExpr - Return true if this builtin can be used where a
- /// constant expression is required.
- bool isConstantExpr(unsigned ID) const {
- return strchr(GetRecord(ID).Attributes, 'C') != 0;
- }
-
/// hasVAListUse - Return true of the specified builtin uses __builtin_va_list
/// as an operand or return type.
bool hasVAListUse(unsigned ID) const {