[llvm-commits] [gcc-plugin] r76415 - in /gcc-plugin/trunk: Makefile bits_and_bobs.cpp
Duncan Sands
baldrick at free.fr
Mon Jul 20 01:56:30 PDT 2009
Author: baldrick
Date: Mon Jul 20 03:56:14 2009
New Revision: 76415
URL: http://llvm.org/viewvc/llvm-project?rev=76415&view=rev
Log:
Add a fake implementation of some rather vital
functions. With this, the plugin now builds
and can be loaded into gcc. So we are back to
the "Yo!" printing stage, only this time it
takes a 17MB plugin to do it :)
Added:
gcc-plugin/trunk/bits_and_bobs.cpp
Modified:
gcc-plugin/trunk/Makefile
Modified: gcc-plugin/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/Makefile?rev=76415&r1=76414&r2=76415&view=diff
==============================================================================
--- gcc-plugin/trunk/Makefile (original)
+++ gcc-plugin/trunk/Makefile Mon Jul 20 03:56:14 2009
@@ -1,4 +1,4 @@
-PLUGIN_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp
+PLUGIN_SOURCE_FILES=llvm-convert.cpp llvm-backend.cpp llvm-debug.cpp llvm-types.cpp bits_and_bobs.cpp
PLUGIN_OBJECT_FILES=$(patsubst %.cpp,%.o,$(PLUGIN_SOURCE_FILES))
#GCCPLUGIN_DIR:=$(shell $(GCC) -print-file-name=plugin)
Added: gcc-plugin/trunk/bits_and_bobs.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/bits_and_bobs.cpp?rev=76415&view=auto
==============================================================================
--- gcc-plugin/trunk/bits_and_bobs.cpp (added)
+++ gcc-plugin/trunk/bits_and_bobs.cpp Mon Jul 20 03:56:14 2009
@@ -0,0 +1,47 @@
+// LLVM headers
+#include "llvm/Constant.h"
+#include "llvm/Value.h"
+
+// GCC headers
+#undef VISIBILITY_HIDDEN
+#define IN_GCC
+
+#include "config.h"
+extern "C" {
+#include "system.h"
+}
+#include "coretypes.h"
+#include "target.h"
+#include "tree.h"
+
+using namespace llvm;
+
+bool flag_odr = false;
+
+void llvm_set_decl (tree t, Value *V) {
+abort();
+}
+
+Value *llvm_get_decl(tree t) {
+abort();
+}
+
+bool llvm_set_decl_p(tree t) {
+abort();
+}
+
+void eraseLocalLLVMValues() {
+abort();
+}
+
+void changeLLVMConstant(Constant *Old, Constant *New) {
+abort();
+}
+
+const Type *llvm_set_type(tree Tr, const Type *Ty) {
+abort();
+}
+
+const Type *llvm_get_type(unsigned Index) {
+abort();
+}
More information about the llvm-commits
mailing list