[llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/Makefile family.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 4 18:00:08 PDT 2004
Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C++/family:
Makefile added (r1.1)
family.cpp updated: 1.1 -> 1.2
---
Log message:
Make this "benchmark" work
---
Diffs of the changes: (+11 -5)
Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/Makefile
diff -c /dev/null llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/Makefile:1.1
*** /dev/null Mon Oct 4 20:00:05 2004
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/Makefile Mon Oct 4 19:59:55 2004
***************
*** 0 ****
--- 1,6 ----
+ LEVEL = ../../../..
+
+ PROG = family
+ LDFLAGS = -lstdc++
+ include $(LEVEL)/MultiSource/Makefile.multisrc
+
Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/family.cpp
diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/family.cpp:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/family.cpp:1.2
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/family.cpp:1.1 Mon Oct 4 15:01:13 2004
+++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/family/family.cpp Mon Oct 4 19:59:55 2004
@@ -1,8 +1,8 @@
// Listings 7.1 and 7.2 from "The C++ Workbook" by Wiener and Pinson.
// Addison-Wesley 1990.
-void strcpy(char *nam1, char *nam2) {*nam1 = *nam2;}
-int strlen(char *nam1) { return 0;}
+#include <string.h>
+#include <stdio.h>
class Parent {
protected:
@@ -31,7 +31,7 @@
}
virtual void answerName(void) {
- lastName;
+ printf("%s\n", lastName);
}
~Parent(void) {
@@ -74,7 +74,7 @@
virtual void answerName(void) {
Parent::answerName();
- firstName;
+ printf("%s\n", firstName);
}
};
@@ -92,7 +92,7 @@
virtual void answerName(void) {
Child::answerName();
- grandFatherName;
+ printf("GCN: %s\n", grandFatherName);
}
};
More information about the llvm-commits
mailing list