aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/builtins.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-08-31 00:14:07 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-08-31 00:14:07 +0000
commita6c66cedc022c9e5d45a937d6b8cff491a6bf81b (patch)
tree22786c2c1573674a6e48ac4e7b0af5d7ad453d9a /test/CodeGenCXX/builtins.cpp
parent918546c584c91ee917c919c967d7d73cecd295dc (diff)
Change the representation of builtin functions in the AST
(__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/builtins.cpp')
-rw-r--r--test/CodeGenCXX/builtins.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/test/CodeGenCXX/builtins.cpp b/test/CodeGenCXX/builtins.cpp
index 4542563717..0629c31015 100644
--- a/test/CodeGenCXX/builtins.cpp
+++ b/test/CodeGenCXX/builtins.cpp
@@ -7,15 +7,3 @@ int main() {
// CHECK: call signext i8 @memmove()
return memmove();
}
-
-// <rdar://problem/10063539>
-
-template<int (*Compare)(const char *s1, const char *s2)>
-int equal(const char *s1, const char *s2) {
- return Compare(s1, s2) == 0;
-}
-
-// CHECK: define weak_odr i32 @_Z5equalIXadL_Z16__builtin_strcmpPKcS1_EEEiS1_S1_
-// CHECK: call i32 @strcmp
-template int equal<&__builtin_strcmp>(const char*, const char*);
-