mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-22 05:51:42 +00:00
In CodeGenPrepare's debug output, use WriteAsOperand instead of
printing getName(), so that unnamed values are printed correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e698696569
commit
03ce042d70
@ -29,6 +29,7 @@
|
|||||||
#include "llvm/Transforms/Utils/Local.h"
|
#include "llvm/Transforms/Utils/Local.h"
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/ADT/SmallSet.h"
|
#include "llvm/ADT/SmallSet.h"
|
||||||
|
#include "llvm/Assembly/Writer.h"
|
||||||
#include "llvm/Support/CallSite.h"
|
#include "llvm/Support/CallSite.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
@ -574,19 +575,28 @@ static inline OStream &operator<<(OStream &OS, const ExtAddrMode &AM) {
|
|||||||
void ExtAddrMode::print(OStream &OS) const {
|
void ExtAddrMode::print(OStream &OS) const {
|
||||||
bool NeedPlus = false;
|
bool NeedPlus = false;
|
||||||
OS << "[";
|
OS << "[";
|
||||||
if (BaseGV)
|
if (BaseGV) {
|
||||||
OS << (NeedPlus ? " + " : "")
|
OS << (NeedPlus ? " + " : "")
|
||||||
<< "GV:%" << BaseGV->getName(), NeedPlus = true;
|
<< "GV:";
|
||||||
|
WriteAsOperand(*OS.stream(), BaseGV, /*PrintType=*/false);
|
||||||
|
NeedPlus = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (BaseOffs)
|
if (BaseOffs)
|
||||||
OS << (NeedPlus ? " + " : "") << BaseOffs, NeedPlus = true;
|
OS << (NeedPlus ? " + " : "") << BaseOffs, NeedPlus = true;
|
||||||
|
|
||||||
if (BaseReg)
|
if (BaseReg) {
|
||||||
OS << (NeedPlus ? " + " : "")
|
OS << (NeedPlus ? " + " : "")
|
||||||
<< "Base:%" << BaseReg->getName(), NeedPlus = true;
|
<< "Base:";
|
||||||
if (Scale)
|
WriteAsOperand(*OS.stream(), BaseReg, /*PrintType=*/false);
|
||||||
|
NeedPlus = true;
|
||||||
|
}
|
||||||
|
if (Scale) {
|
||||||
OS << (NeedPlus ? " + " : "")
|
OS << (NeedPlus ? " + " : "")
|
||||||
<< Scale << "*%" << ScaledReg->getName(), NeedPlus = true;
|
<< Scale << "*";
|
||||||
|
WriteAsOperand(*OS.stream(), ScaledReg, /*PrintType=*/false);
|
||||||
|
NeedPlus = true;
|
||||||
|
}
|
||||||
|
|
||||||
OS << ']';
|
OS << ']';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user