mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 03:39:03 +00:00
Print debug information for SDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103227 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
281d65d004
commit
cc751bb99c
@ -15,6 +15,7 @@
|
|||||||
#include "SDNodeOrdering.h"
|
#include "SDNodeOrdering.h"
|
||||||
#include "SDNodeDbgValue.h"
|
#include "SDNodeDbgValue.h"
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
|
#include "llvm/Analysis/DebugInfo.h"
|
||||||
#include "llvm/Analysis/ValueTracking.h"
|
#include "llvm/Analysis/ValueTracking.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/GlobalAlias.h"
|
#include "llvm/GlobalAlias.h"
|
||||||
@ -6008,6 +6009,21 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
|
|||||||
|
|
||||||
if (getNodeId() != -1)
|
if (getNodeId() != -1)
|
||||||
OS << " [ID=" << getNodeId() << ']';
|
OS << " [ID=" << getNodeId() << ']';
|
||||||
|
|
||||||
|
DebugLoc dl = getDebugLoc();
|
||||||
|
if (G && !dl.isUnknown()) {
|
||||||
|
DIScope
|
||||||
|
Scope(dl.getScope(G->getMachineFunction().getFunction()->getContext()));
|
||||||
|
OS << " dbg:";
|
||||||
|
// Omit the directory, since it's usually long and uninteresting.
|
||||||
|
if (Scope.Verify())
|
||||||
|
OS << Scope.getFilename();
|
||||||
|
else
|
||||||
|
OS << "<unknown>";
|
||||||
|
OS << ':' << dl.getLine();
|
||||||
|
if (dl.getCol() != 0)
|
||||||
|
OS << ':' << dl.getCol();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDNode::print(raw_ostream &OS, const SelectionDAG *G) const {
|
void SDNode::print(raw_ostream &OS, const SelectionDAG *G) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user