MC: make helper function be more const-correct

Introduce const-ness on parameters, they are used as read-only and should not be
modified.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool 2014-07-13 19:03:40 +00:00
parent 1f1e6e7884
commit 117ff62354

View File

@ -46,16 +46,13 @@ static uint8_t CountOfUnwindCodes(std::vector<MCWin64EHInstruction> &Insns) {
return Count;
}
static void EmitAbsDifference(MCStreamer &streamer, MCSymbol *lhs,
MCSymbol *rhs) {
MCContext &context = streamer.getContext();
const MCExpr *diff = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(
lhs, context),
MCSymbolRefExpr::Create(
rhs, context),
context);
streamer.EmitAbsValue(diff, 1);
static void EmitAbsDifference(MCStreamer &Streamer, const MCSymbol *LHS,
const MCSymbol *RHS) {
MCContext &Context = Streamer.getContext();
const MCExpr *Diff =
MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(LHS, Context),
MCSymbolRefExpr::Create(RHS, Context), Context);
Streamer.EmitAbsValue(Diff, 1);
}
static void EmitUnwindCode(MCStreamer &streamer, MCSymbol *begin,