diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2009-10-22 20:57:35 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-10-22 20:57:35 +0000 |
commit | c367e0c0fc47a0abc9551e550d027fd58d42a026 (patch) | |
tree | a70ef75a082cbb67279c4de31ee6212706f2b932 /lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp | |
parent | 48dc29ef911a223a52b099604d0ccb499ecbf703 (diff) |
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
Diffstat (limited to 'lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp index 69398be508..00c4af7ac2 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<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 @@ 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<void*>(Result.vma) << " to " << Result.filename << ":" << Result.lineno << "\n"); return Result; |