summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-04-05 21:09:12 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-04-05 21:09:12 +0000
commit7dd816097a8f5b7bb64243fafb529eea311cc5ad (patch)
tree530e15318001700dc2119c5f6c17d43a43fcb590 /llvm/lib/ExecutionEngine
parentf38547c83f8c8e70680689c540c3b702183aabbf (diff)
downloadbcm5719-llvm-7dd816097a8f5b7bb64243fafb529eea311cc5ad.tar.gz
bcm5719-llvm-7dd816097a8f5b7bb64243fafb529eea311cc5ad.zip
Fix OProfileJITEventListener build for new DebugLoc.
llvm-svn: 100461
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp b/llvm/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
index 2baf97911d5..9c01b7329a5 100644
--- a/llvm/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
@@ -19,6 +19,7 @@
#define DEBUG_TYPE "oprofile-jit-event-listener"
#include "llvm/Function.h"
#include "llvm/Metadata.h"
+#include "llvm/ADT/DenseMap.h"
#include "llvm/Analysis/DebugInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
@@ -77,10 +78,10 @@ class FilenameCache {
DenseMap<AssertingVH<MDNode>, std::string> Filenames;
public:
- const char *getFilename(DIScope Scope) {
- std::string &Filename = Filenames[Scope.getNode()];
+ const char *getFilename(MDNode *Scope) {
+ std::string &Filename = Filenames[Scope];
if (Filename.empty()) {
- Filename = Scope.getFilename();
+ Filename = DIScope(Scope).getFilename();
}
return Filename.c_str();
}
@@ -91,9 +92,9 @@ static debug_line_info LineStartToOProfileFormat(
uintptr_t Address, DebugLoc Loc) {
debug_line_info Result;
Result.vma = Address;
- DILocation DILoc = MF.getDILocation(Loc);
- Result.lineno = DILoc.getLineNumber();
- Result.filename = Filenames.getFilename(DILoc.getScope());
+ Result.lineno = Loc.getLine();
+ Result.filename = Filenames.getFilename(
+ Loc.getScope(MF.getFunction()->getContext()));
DEBUG(dbgs() << "Mapping " << reinterpret_cast<void*>(Result.vma) << " to "
<< Result.filename << ":" << Result.lineno << "\n");
return Result;
OpenPOWER on IntegriCloud