[llvm-commits] [llvm-gcc-4.2] r114276 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Gabor Greif
ggreif at gmail.com
Sat Sep 18 04:52:02 PDT 2010
Author: ggreif
Date: Sat Sep 18 06:52:02 2010
New Revision: 114276
URL: http://llvm.org/viewvc/llvm-project?rev=114276&view=rev
Log:
do not rely on the implicit-dereference semantics of dyn_cast_or_null
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=114276&r1=114275&r2=114276&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Sat Sep 18 06:52:02 2010
@@ -505,7 +505,7 @@
std::map<tree_node *, WeakVH>::iterator I = RegionMap.find(Node);
if (I != RegionMap.end())
- if (MDNode *R = dyn_cast_or_null<MDNode>(I->second))
+ if (MDNode *R = dyn_cast_or_null<MDNode>(&*I->second))
return DIDescriptor(R);
if (TYPE_P (Node)) {
@@ -1004,7 +1004,7 @@
// descriptor.
std::map<tree_node *, WeakVH >::iterator I = TypeCache.find(type);
if (I != TypeCache.end())
- if (MDNode *TN = dyn_cast_or_null<MDNode>(I->second))
+ if (MDNode *TN = dyn_cast_or_null<MDNode>(&*I->second))
return DIType(TN);
// forward declaration,
More information about the llvm-commits
mailing list