From c367e0c0fc47a0abc9551e550d027fd58d42a026 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Thu, 22 Oct 2009 20:57:35 +0000 Subject: [PATCH] Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84895 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp index 69398be5080..00c4af7ac26 100644 --- a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp +++ b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp @@ -69,16 +69,16 @@ OProfileJITEventListener::~OProfileJITEventListener() { } 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 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 @@ static debug_line_info LineStartToOProfileFormat( 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(Result.vma) << " to " << Result.filename << ":" << Result.lineno << "\n"); return Result;