OSDN Git Service

testcases for -fno-builtin
authorDale Johannesen <dalej@apple.com>
Sun, 15 Apr 2007 00:18:31 +0000 (00:18 +0000)
committerDale Johannesen <dalej@apple.com>
Sun, 15 Apr 2007 00:18:31 +0000 (00:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36038 91177308-0d34-0410-b5e6-96231b3b80d8

test/C++Frontend/2007-04-14-FNoBuiltin.cpp [new file with mode: 0644]
test/CFrontend/2007-04-14-FNoBuiltin.c [new file with mode: 0644]

diff --git a/test/C++Frontend/2007-04-14-FNoBuiltin.cpp b/test/C++Frontend/2007-04-14-FNoBuiltin.cpp
new file mode 100644 (file)
index 0000000..c52b30b
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | llvm-as -f | llc | grep -v puts
+// Check that -fno-builtin is honored.
+
+extern "C" int printf(const char*, ...);
+void foo(const char *msg) {
+       printf("%s\n",msg);
+}
diff --git a/test/CFrontend/2007-04-14-FNoBuiltin.c b/test/CFrontend/2007-04-14-FNoBuiltin.c
new file mode 100644 (file)
index 0000000..454396b
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -S %s -O2 -fno-builtin -o - | llvm-as -f | llc | grep -v puts
+// Check that -fno-builtin is honored.
+
+extern int printf(const char*, ...);
+void foo(const char *msg) {
+       printf("%s\n",msg);
+}