From 36ee010b9d2ab6250d9c23d311510fcdcad646c3 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 17 Jul 2013 23:25:22 +0000 Subject: Add comparison operators for DIDescriptors to fix c++98 fallout of operator bool change. Also convert a variable in DebugIR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186544 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/llvm') diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index 1d7384c..02335ee 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -109,6 +109,13 @@ namespace llvm { // implicitly convertable to pointer. LLVM_EXPLICIT operator bool() const { return DbgNode != 0; } + bool operator==(DIDescriptor Other) const { + return DbgNode != Other.DbgNode; + } + bool operator!=(DIDescriptor Other) const { + return !operator==(Other); + } + unsigned getTag() const { return getUnsignedField(0) & ~LLVMDebugVersionMask; } -- cgit v1.1