mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Add comparison operators for DIDescriptors to fix c++98 fallout
of operator bool change. Also convert a variable in DebugIR. llvm-svn: 186544
This commit is contained in:
parent
8a4d277bbd
commit
8b4b95131b
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user