summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-05-07 18:11:54 +0000
committerDevang Patel <dpatel@apple.com>2010-05-07 18:11:54 +0000
commit2db49d797b86b7f3615bae17b2b016727778a6c4 (patch)
tree9d49e30145abb5d18aaf5db59a06afa45e5c3a06 /include
parent021b5ef903cab189a6c04644b977212d570ae8c9 (diff)
downloadllvm-2db49d797b86b7f3615bae17b2b016727778a6c4.tar.gz
llvm-2db49d797b86b7f3615bae17b2b016727778a6c4.tar.bz2
llvm-2db49d797b86b7f3615bae17b2b016727778a6c4.tar.xz
Avoid DIDescriptor::getNode(). Use overloaded operators instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/DebugInfo.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h
index f292650991..9f269414c7 100644
--- a/include/llvm/Analysis/DebugInfo.h
+++ b/include/llvm/Analysis/DebugInfo.h
@@ -63,7 +63,9 @@ namespace llvm {
bool Verify() const { return DbgNode != 0; }
- MDNode *getNode() const { return DbgNode; }
+ MDNode *getNode() const { return DbgNode; }
+ operator MDNode *() const { return DbgNode; }
+ MDNode *operator ->() const { return DbgNode; }
unsigned getVersion() const {
return getUnsignedField(0) & LLVMDebugVersionMask;
@@ -397,7 +399,7 @@ namespace llvm {
DICompositeType DCT(getFieldAs<DICompositeType>(8));
if (DCT.Verify()) {
DIArray A = DCT.getTypeArray();
- DIType T(A.getElement(0).getNode());
+ DIType T(A.getElement(0));
return T.getName();
}
DIType T(getFieldAs<DIType>(8));