Add a dependency to the trace library so that it gets pulled in
automatically.

llvm-svn: 19828
diff --git a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
index 2b1ed27..f645f1b 100644
--- a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -118,9 +118,11 @@
   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);