summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-10-07 20:17:24 +0000
committerOwen Anderson <resistor@mac.com>2010-10-07 20:17:24 +0000
commit9786868939aaaa4c88e6f726684a571a5815cce4 (patch)
tree8ae132b4be14c7ac5ac08974e20a009147096656 /llvm/lib/Transforms
parent29b8fb1771c43b6f5cdc5451f9c30d7a7108b77d (diff)
downloadbcm5719-llvm-9786868939aaaa4c88e6f726684a571a5815cce4.tar.gz
bcm5719-llvm-9786868939aaaa4c88e6f726684a571a5815cce4.zip
Add initialization routines for Instrumentation.
llvm-svn: 115971
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Instrumentation/CMakeLists.txt1
-rw-r--r--llvm/lib/Transforms/Instrumentation/Instrumentation.cpp31
2 files changed, 32 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/CMakeLists.txt b/llvm/lib/Transforms/Instrumentation/CMakeLists.txt
index 128bf489787..80bb48cefa4 100644
--- a/llvm/lib/Transforms/Instrumentation/CMakeLists.txt
+++ b/llvm/lib/Transforms/Instrumentation/CMakeLists.txt
@@ -1,5 +1,6 @@
add_llvm_library(LLVMInstrumentation
EdgeProfiling.cpp
+ Instrumentation.cpp
OptimalEdgeProfiling.cpp
ProfilingUtils.cpp
)
diff --git a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
new file mode 100644
index 00000000000..21dc7b94730
--- /dev/null
+++ b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
@@ -0,0 +1,31 @@
+//===-- Instrumentation.cpp - TransformUtils Infrastructure ---------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines the common initialization infrastructure for the
+// Instrumentation library.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/InitializePasses.h"
+#include "llvm-c/Initialization.h"
+
+using namespace llvm;
+
+/// initializeInstrumentation - Initialize all passes in the TransformUtils
+/// library.
+void llvm::initializeInstrumentation(PassRegistry &Registry) {
+ initializeEdgeProfilerPass(Registry);
+ initializeOptimalEdgeProfilerPass(Registry);
+}
+
+/// LLVMInitializeInstrumentation - C binding for
+/// initializeInstrumentation.
+void LLVMInitializeInstrumentation(LLVMPassRegistryRef R) {
+ initializeInstrumentation(*unwrap(R));
+}
OpenPOWER on IntegriCloud