diff options
Diffstat (limited to 'contrib/llvm/lib/Transforms/Hello')
-rw-r--r-- | contrib/llvm/lib/Transforms/Hello/Hello.cpp | 4 | ||||
-rw-r--r-- | contrib/llvm/lib/Transforms/Hello/Hello.exports | 0 | ||||
-rw-r--r-- | contrib/llvm/lib/Transforms/Hello/Makefile | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/contrib/llvm/lib/Transforms/Hello/Hello.cpp b/contrib/llvm/lib/Transforms/Hello/Hello.cpp index 37d7a00..abfa514 100644 --- a/contrib/llvm/lib/Transforms/Hello/Hello.cpp +++ b/contrib/llvm/lib/Transforms/Hello/Hello.cpp @@ -28,7 +28,7 @@ namespace { Hello() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F) { - HelloCounter++; + ++HelloCounter; errs() << "Hello: "; errs().write_escaped(F.getName()) << '\n'; return false; @@ -46,7 +46,7 @@ namespace { Hello2() : FunctionPass(&ID) {} virtual bool runOnFunction(Function &F) { - HelloCounter++; + ++HelloCounter; errs() << "Hello: "; errs().write_escaped(F.getName()) << '\n'; return false; diff --git a/contrib/llvm/lib/Transforms/Hello/Hello.exports b/contrib/llvm/lib/Transforms/Hello/Hello.exports new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/contrib/llvm/lib/Transforms/Hello/Hello.exports diff --git a/contrib/llvm/lib/Transforms/Hello/Makefile b/contrib/llvm/lib/Transforms/Hello/Makefile index c5e75d4..f1e3148 100644 --- a/contrib/llvm/lib/Transforms/Hello/Makefile +++ b/contrib/llvm/lib/Transforms/Hello/Makefile @@ -12,5 +12,13 @@ LIBRARYNAME = LLVMHello LOADABLE_MODULE = 1 USEDLIBS = +# If we don't need RTTI or EH, there's no reason to export anything +# from the hello plugin. +ifneq ($(REQUIRES_RTTI), 1) +ifneq ($(REQUIRES_EH), 1) +EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/Hello.exports +endif +endif + include $(LEVEL)/Makefile.common |