Skip to content

Commit 571f056

Browse files
committed
remove debugging code
1 parent e425a7c commit 571f056

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

llvm/include/llvm/MC/MCInstrAnalysis.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ class MCInstrAnalysis {
184184

185185
/// Given an instruction that accesses a menory address, try to compute
186186
/// the target address. Return true success, and the address in Target.
187-
virtual bool
188-
evaluateInstruction(const MCInst &Inst, uint64_t Addr, uint64_t Size,
189-
uint64_t &Target, raw_ostream *TargetOS) const;
187+
virtual bool evaluateInstruction(const MCInst &Inst, uint64_t Addr,
188+
uint64_t Size, uint64_t &Target,
189+
raw_ostream *TargetOS) const;
190190

191191
/// Given an instruction tries to get the address of a memory operand. Returns
192192
/// the address on success.

llvm/lib/MC/MCInstrAnalysis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ bool MCInstrAnalysis::evaluateBranch(const MCInst & /*Inst*/, uint64_t /*Addr*/,
3030
return false;
3131
}
3232

33-
bool MCInstrAnalysis::evaluateInstruction(const MCInst &Inst,
34-
uint64_t Addr, uint64_t Size,
35-
uint64_t &Target, raw_ostream *TargetOS) const {
33+
bool MCInstrAnalysis::evaluateInstruction(const MCInst &Inst, uint64_t Addr,
34+
uint64_t Size, uint64_t &Target,
35+
raw_ostream *TargetOS) const {
3636
return false;
3737
}
3838

llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ class RISCVMCInstrAnalysis : public MCInstrAnalysis {
241241
}
242242

243243
bool evaluateInstruction(const MCInst &Inst, uint64_t Addr, uint64_t Size,
244-
uint64_t &Target, raw_ostream *TargetOS) const override {
244+
uint64_t &Target,
245+
raw_ostream *TargetOS) const override {
245246
switch(Inst.getOpcode()) {
246247
default:
247248
return false;
@@ -428,6 +429,8 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTargetMC() {
428429
TargetRegistry::RegisterNullTargetStreamer(*T,
429430
createRISCVNullTargetStreamer);
430431
}
431-
TargetRegistry::RegisterMCInstrAnalysis(getTheRISCV32Target(), createRISCV32InstrAnalysis);
432-
TargetRegistry::RegisterMCInstrAnalysis(getTheRISCV64Target(), createRISCV64InstrAnalysis);
432+
TargetRegistry::RegisterMCInstrAnalysis(getTheRISCV32Target(),
433+
createRISCV32InstrAnalysis);
434+
TargetRegistry::RegisterMCInstrAnalysis(getTheRISCV64Target(),
435+
createRISCV64InstrAnalysis);
433436
}

llvm/tools/llvm-objdump/llvm-objdump.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,8 +2323,11 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
23232323
if (Disassembled && DT->InstrAnalysis) {
23242324
llvm::raw_ostream *TargetOS = &FOS;
23252325
uint64_t Target;
2326-
bool PrintTarget = DT->InstrAnalysis->evaluateBranch(Inst, SectionAddr + Index, Size, Target) ||
2327-
DT->InstrAnalysis->evaluateInstruction(Inst, SectionAddr + Index, Size, Target, TargetOS);
2326+
bool PrintTarget =
2327+
DT->InstrAnalysis->evaluateBranch(Inst, SectionAddr + Index,
2328+
Size, Target) ||
2329+
DT->InstrAnalysis->evaluateInstruction(
2330+
Inst, SectionAddr + Index, Size, Target, TargetOS);
23282331
if (!PrintTarget) {
23292332
if (std::optional<uint64_t> MaybeTarget =
23302333
DT->InstrAnalysis->evaluateMemoryOperandAddress(

0 commit comments

Comments
 (0)