aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/TraceValues.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Instrumentation/TraceValues.cpp')
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index 2b1ed27c54..f645f1b451 100644
--- a/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -118,9 +118,11 @@ FunctionPass *llvm::createTraceValuesPassForBasicBlocks() {
return new BasicBlockTracer();
}
-// Add a prototype for external functions used by the tracing code.
+// Add a prototype for external functions used by the tracing code and require
+// the trace library for this module.
//
void ExternalFuncs::doInitialization(Module &M) {
+ M.addLibrary("trace");
const Type *SBP = PointerType::get(Type::SByteTy);
const FunctionType *MTy =
FunctionType::get(Type::IntTy, std::vector<const Type*>(1, SBP), true);