forked from OSchip/llvm-project
SelectionDAG: Reflow code to use early returns, NFC
llvm-svn: 233577
This commit is contained in:
parent
f94d5b5137
commit
b525e1c07c
|
@ -520,10 +520,15 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
|
|||
if (getNodeId() != -1)
|
||||
OS << " [ID=" << getNodeId() << ']';
|
||||
|
||||
if (!G)
|
||||
return;
|
||||
|
||||
DebugLoc dl = getDebugLoc();
|
||||
if (G && !dl.isUnknown()) {
|
||||
DIScope
|
||||
Scope(dl.getScope(G->getMachineFunction().getFunction()->getContext()));
|
||||
if (dl.isUnknown())
|
||||
return;
|
||||
|
||||
DIScope Scope(
|
||||
dl.getScope(G->getMachineFunction().getFunction()->getContext()));
|
||||
OS << " dbg:";
|
||||
assert((!Scope || Scope.isScope()) &&
|
||||
"Scope of a DebugLoc should be null or a DIScope.");
|
||||
|
@ -533,9 +538,8 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
|
|||
else
|
||||
OS << "<unknown>";
|
||||
OS << ':' << dl.getLine();
|
||||
if (dl.getCol() != 0)
|
||||
OS << ':' << dl.getCol();
|
||||
}
|
||||
if (unsigned C = dl.getCol())
|
||||
OS << ':' << C;
|
||||
}
|
||||
|
||||
static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
|
||||
|
|
Loading…
Reference in New Issue