[llvm-commits] [llvm] r84895 - /llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp

Jeffrey Yasskin jyasskin at google.com
Thu Oct 22 13:57:35 PDT 2009


Author: jyasskin
Date: Thu Oct 22 15:57:35 2009
New Revision: 84895

URL: http://llvm.org/viewvc/llvm-project?rev=84895&view=rev
Log:
Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.

Modified:
    llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp?rev=84895&r1=84894&r2=84895&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp Thu Oct 22 15:57:35 2009
@@ -69,16 +69,16 @@
 }
 
 class FilenameCache {
-  // Holds the filename of each CompileUnit, so that we can pass the
+  // Holds the filename of each Scope, so that we can pass the
   // pointer into oprofile.  These char*s are freed in the destructor.
   DenseMap<MDNode*, char*> Filenames;
 
  public:
-  const char *getFilename(MDNode *CompileUnit) {
-    char *&Filename = Filenames[CompileUnit];
+  const char *getFilename(MDNode *Scope) {
+    char *&Filename = Filenames[Scope];
     if (Filename == NULL) {
-      DICompileUnit CU(CompileUnit);
-      Filename = strdup(CU.getFilename());
+      DIScope S(Scope);
+      Filename = strdup(S.getFilename());
     }
     return Filename;
   }
@@ -97,7 +97,7 @@
   Result.vma = Address;
   const DebugLocTuple &tuple = MF.getDebugLocTuple(Loc);
   Result.lineno = tuple.Line;
-  Result.filename = Filenames.getFilename(tuple.CompileUnit);
+  Result.filename = Filenames.getFilename(tuple.Scope);
   DEBUG(errs() << "Mapping " << reinterpret_cast<void*>(Result.vma) << " to "
                << Result.filename << ":" << Result.lineno << "\n");
   return Result;





More information about the llvm-commits mailing list