[llvm] r212913 - MC: make helper function be more const-correct
Saleem Abdulrasool
compnerd at compnerd.org
Sun Jul 13 12:03:41 PDT 2014
Author: compnerd
Date: Sun Jul 13 14:03:40 2014
New Revision: 212913
URL: http://llvm.org/viewvc/llvm-project?rev=212913&view=rev
Log:
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.
Modified:
llvm/trunk/lib/MC/MCWin64EH.cpp
Modified: llvm/trunk/lib/MC/MCWin64EH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCWin64EH.cpp?rev=212913&r1=212912&r2=212913&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCWin64EH.cpp (original)
+++ llvm/trunk/lib/MC/MCWin64EH.cpp Sun Jul 13 14:03:40 2014
@@ -46,16 +46,13 @@ static uint8_t CountOfUnwindCodes(std::v
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,
More information about the llvm-commits
mailing list