aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/DebugInfo.h7
-rw-r--r--lib/Transforms/Instrumentation/DebugIR.cpp2
2 files changed, 8 insertions, 1 deletions
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;
}
diff --git a/lib/Transforms/Instrumentation/DebugIR.cpp b/lib/Transforms/Instrumentation/DebugIR.cpp
index b5bdc75..cea19e6 100644
--- a/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/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));