[llvm-commits] [llvm] r80411 - /llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
Jeffrey Yasskin
jyasskin at google.com
Fri Aug 28 17:44:16 PDT 2009
Author: jyasskin
Date: Fri Aug 28 19:44:16 2009
New Revision: 80411
URL: http://llvm.org/viewvc/llvm-project?rev=80411&view=rev
Log:
Fix OProfile support after r80406 changed the DebugInfo interface from
GlobalVariables to MDNodes.
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=80411&r1=80410&r2=80411&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp Fri Aug 28 19:44:16 2009
@@ -71,12 +71,12 @@
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 @@
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);
}
More information about the llvm-commits
mailing list