Fix the build for people with oprofile installed.
authorNick Lewycky <nicholas@mxc.ca>
Sun, 2 Aug 2009 20:51:44 +0000 (20:51 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 2 Aug 2009 20:51:44 +0000 (20:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77914 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp

index 71502e927cd70b360c2d5deb0f3eca78a4e349b0..9bc1765faa03b80ac513e1b5dd923e2021e9da1f 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/ExecutionEngine/JITEventListener.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/System/Errno.h"
 #include "llvm/Config/config.h"
 #include <stddef.h>
@@ -112,7 +113,7 @@ void OProfileJITEventListener::NotifyFunctionEmitted(
                            reinterpret_cast<uint64_t>(FnStart),
                            FnStart, FnSize) == -1) {
     DEBUG(errs() << "Failed to tell OProfile about native function " 
-          << Fn.getName() << " at [" 
+          << F.getName() << " at [" 
           << FnStart << "-" << ((char*)FnStart + FnSize) << "]\n");
     return;
   }
@@ -152,8 +153,8 @@ void OProfileJITEventListener::NotifyFreeingMachineCode(
     const Function &F, void *FnStart) {
   assert(FnStart && "Invalid function pointer");
   if (op_unload_native_code(Agent, reinterpret_cast<uint64_t>(FnStart)) == -1) {
-    DOUT << "Failed to tell OProfile about unload of native function "
-         << F.getName() << " at " << FnStart << "\n";
+    DEBUG(errs() << "Failed to tell OProfile about unload of native function "
+                 << F.getName() << " at " << FnStart << "\n");
   }
 }