Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>
[oota-llvm.git] / lib / Transforms / Instrumentation / PathProfiling.cpp
index 2a0e89ce6a1e31e9eb923e1fc60ec74cfda1277a..2d324b89b109f0f16d92d9c2b74ec561561214d9 100644 (file)
@@ -1345,8 +1345,8 @@ bool PathProfiler::runOnModule(Module &M) {
     Main = M.getFunction("MAIN__");
 
   if (!Main) {
-    errs() << "WARNING: cannot insert path profiling into a module"
-           << " with no main function!\n";
+    Context->emitWarning("cannot insert edge profiling into a module"
+                         " with no main function");
     return false;
   }