summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-07-17 23:25:22 +0000
committerEric Christopher <echristo@gmail.com>2013-07-17 23:25:22 +0000
commit7ab2c3ecb22ca33bd68a69c0a1b4ac4826a7a0d8 (patch)
tree888525aca259c12120b0e75cf56b4984a8b7717f /llvm
parenta4e2dafd247f3cbbf5ea89457e6e2570705ff2e3 (diff)
downloadbcm5719-llvm-7ab2c3ecb22ca33bd68a69c0a1b4ac4826a7a0d8.tar.gz
bcm5719-llvm-7ab2c3ecb22ca33bd68a69c0a1b4ac4826a7a0d8.zip
Add comparison operators for DIDescriptors to fix c++98 fallout
of operator bool change. Also convert a variable in DebugIR. llvm-svn: 186544
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/DebugInfo.h7
-rw-r--r--llvm/lib/Transforms/Instrumentation/DebugIR.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm/include/llvm/DebugInfo.h b/llvm/include/llvm/DebugInfo.h
index 1d7384c1170..02335eeadd3 100644
--- a/llvm/include/llvm/DebugInfo.h
+++ b/llvm/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;
}
diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
index b5bdc7560b6..cea19e6510d 100644
--- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
@@ -220,7 +220,7 @@ public:
DICompileUnit(CUNode), F.getName(), MangledName, DIFile(FileNode), Line,
Sig, Local, IsDefinition, ScopeLine, FuncFlags, IsOptimized, &F);
assert(Sub.isSubprogram());
- DEBUG(dbgs() << "create subprogram mdnode " << Sub << ": "
+ DEBUG(dbgs() << "create subprogram mdnode " << *Sub << ": "
<< "\n");
SubprogramDescriptors.insert(std::make_pair(&F, Sub));
OpenPOWER on IntegriCloud