]> granicus.if.org Git - clang/commitdiff
Remove the 'C' / isConstantExpr flag on builtins. Code should never
authorChris Lattner <sabre@nondot.org>
Mon, 6 Oct 2008 06:51:12 +0000 (06:51 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Oct 2008 06:51:12 +0000 (06:51 +0000)
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

include/clang/AST/Builtins.def
include/clang/AST/Builtins.h

index c993a75377481debffe0e8c32d60b699f4a7f140..d23cc14eb92b2f62389f74c02bbd4fc098999ad4 100644 (file)
 //  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")
index 10805fa0fa6dfb27143c52c1216b4e0889aa727d..7da9a5f26af06eac6c9c6b532a7731be7a79f8f4 100644 (file)
@@ -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 {