[llvm-commits] [gcc-plugin] r80756 - in /gcc-plugin/trunk: Makefile llvm-cache.c llvm-cache.h
Duncan Sands
baldrick at free.fr
Tue Sep 1 20:29:16 PDT 2009
Author: baldrick
Date: Tue Sep 1 22:29:14 2009
New Revision: 80756
URL: http://llvm.org/viewvc/llvm-project?rev=80756&view=rev
Log:
Generate information needed by the garbage collector.
Modified:
gcc-plugin/trunk/Makefile
gcc-plugin/trunk/llvm-cache.c
gcc-plugin/trunk/llvm-cache.h
Modified: gcc-plugin/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/Makefile?rev=80756&r1=80755&r2=80756&view=diff
==============================================================================
--- gcc-plugin/trunk/Makefile (original)
+++ gcc-plugin/trunk/Makefile Tue Sep 1 22:29:14 2009
@@ -13,6 +13,9 @@
$(ARCH_DIR)/llvm-target.cpp llvm-types.cpp bits_and_bobs.cpp
PLUGIN_OBJECT_FILES=$(C_SOURCE_FILES:.c=.o) $(CPP_SOURCE_FILES:.cpp=.o)
+GTYPE_INPUT_FILE=$(PWD)/llvm-cache.c
+GTYPE_OUTPUT_FILE=$(PWD)/gt-llvm-cache.h
+
CFLAGS+=-Wall -Werror -fPIC -g -O2
CFLAGS+=-DIN_GCC -DREVISION=\"$(REVISION)\" \
-DTARGET_NAME=\"$(TARGET_TRIPLE)\" -I$(ARCH_DIR)
@@ -27,5 +30,12 @@
llvm.so: $(PLUGIN_OBJECT_FILES)
$(CXX) -shared $^ -o $@ $(LDFLAGS)
+llvm-cache.c: gt-llvm-cache.h
+
+gt-llvm-cache.h:
+ cd $(GCCOBJECT_DIR)/gcc && ./build/gengtype \
+ -P $(GTYPE_OUTPUT_FILE) $(GCCSOURCE_DIR) gtyp-input.list \
+ $(GTYPE_INPUT_FILE)
+
clean::
- rm -f *.o *.so $(ARCH_DIR)/*.o
+ rm -f *.o *.so $(ARCH_DIR)/*.o $(GTYPE_OUTPUT_FILE)
Modified: gcc-plugin/trunk/llvm-cache.c
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-cache.c?rev=80756&r1=80755&r2=80756&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-cache.c (original)
+++ gcc-plugin/trunk/llvm-cache.c Tue Sep 1 22:29:14 2009
@@ -29,7 +29,7 @@
#include "llvm-cache.h"
// GCC headers
-#include "hashtab.h"
+#include "ggc.h"
#include "stdio.h" //QQ
@@ -94,3 +94,5 @@
return val;
}
+
+#include "gt-llvm-cache.h"
Modified: gcc-plugin/trunk/llvm-cache.h
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-cache.h?rev=80756&r1=80755&r2=80756&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-cache.h (original)
+++ gcc-plugin/trunk/llvm-cache.h Tue Sep 1 22:29:14 2009
@@ -31,7 +31,6 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "ggc.h"
#include "target.h"
#include "tree.h"
More information about the llvm-commits
mailing list