Skip to content
Snippets Groups Projects
Commit 9e955171 authored by Jeffrey Yasskin's avatar Jeffrey Yasskin
Browse files

Fix OProfile support after r80406 changed the DebugInfo interface from

GlobalVariables to MDNodes.

llvm-svn: 80411
parent 7cb103dc
No related branches found
No related tags found
No related merge requests found
......@@ -71,12 +71,12 @@ OProfileJITEventListener::~OProfileJITEventListener() {
class FilenameCache {
// Holds the filename of each CompileUnit, so that we can pass the
// pointer into oprofile. These char*s are freed in the destructor.
DenseMap<GlobalVariable*, char*> Filenames;
DenseMap<MDNode*, char*> Filenames;
// Used as the scratch space in DICompileUnit::getFilename().
std::string TempFilename;
public:
const char* getFilename(GlobalVariable *CompileUnit) {
const char* getFilename(MDNode *CompileUnit) {
char *&Filename = Filenames[CompileUnit];
if (Filename == NULL) {
DICompileUnit CU(CompileUnit);
......@@ -85,7 +85,7 @@ class FilenameCache {
return Filename;
}
~FilenameCache() {
for (DenseMap<GlobalVariable*, char*>::iterator
for (DenseMap<MDNode*, char*>::iterator
I = Filenames.begin(), E = Filenames.end(); I != E;++I) {
free(I->second);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment