Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ const MCExpr *TargetLoweringObjectFileCOFF::lowerRelativeReference(
static std::string APIntToHexString(const APInt &AI) {
unsigned Width = (AI.getBitWidth() / 8) * 2;
std::string HexString = AI.toString(16, /*Signed=*/false);
transform(HexString.begin(), HexString.end(), HexString.begin(), tolower);
transform(HexString, HexString.begin(), ::tolower);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this change be squashed into a previous commit?

unsigned Size = HexString.size();
assert(Width >= Size && "hex string is too large!");
HexString.insert(HexString.begin(), Width - Size, '0');
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/RISCV/ISPAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/Support/TargetRegistry.h"
#include "TargetInfo/RISCVTargetInfo.h"

#include "ISP.h"

Expand Down
4 changes: 4 additions & 0 deletions llvm/lib/Target/RISCV/RISCVAsmPrinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/ADT/Statistic.h"

#define DEBUG_TYPE "asm-printer"

using namespace llvm;

STATISTIC(RISCVNumInstrsCompressed,
"Number of RISC-V Compressed instructions emitted");

class RISCVAsmPrinter : public AsmPrinter {
public:
explicit RISCVAsmPrinter(TargetMachine &TM,
Expand Down