aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitaaa8d878f0357b27f02a4f7a088d355209d8c78d (patch)
treed9c4c06520c84a9fbf22150aa33d14cff3b6b7f4 /lib/Transforms
parentf102e84252557010cc4f83588b898ba69bbe1943 (diff)
downloadexternal_llvm-aaa8d878f0357b27f02a4f7a088d355209d8c78d.zip
external_llvm-aaa8d878f0357b27f02a4f7a088d355209d8c78d.tar.gz
external_llvm-aaa8d878f0357b27f02a4f7a088d355209d8c78d.tar.bz2
Add initialization routines for Instrumentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Instrumentation/CMakeLists.txt1
-rw-r--r--lib/Transforms/Instrumentation/Instrumentation.cpp31
2 files changed, 32 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/CMakeLists.txt b/lib/Transforms/Instrumentation/CMakeLists.txt
index 128bf48..80bb48c 100644
--- a/lib/Transforms/Instrumentation/CMakeLists.txt
+++ b/lib/Transforms/Instrumentation/CMakeLists.txt
@@ -1,5 +1,6 @@
add_llvm_library(LLVMInstrumentation
EdgeProfiling.cpp
+ Instrumentation.cpp
OptimalEdgeProfiling.cpp
ProfilingUtils.cpp
)
diff --git a/lib/Transforms/Instrumentation/Instrumentation.cpp b/lib/Transforms/Instrumentation/Instrumentation.cpp
new file mode 100644
index 0000000..21dc7b9
--- /dev/null
+++ b/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));
+}