[lld] r299493 - Add newlines.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 17:43:05 PDT 2017
Author: ruiu
Date: Tue Apr 4 19:43:05 2017
New Revision: 299493
URL: http://llvm.org/viewvc/llvm-project?rev=299493&view=rev
Log:
Add newlines.
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=299493&r1=299492&r2=299493&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Tue Apr 4 19:43:05 2017
@@ -80,34 +80,42 @@ static ExprValue add(ExprValue A, ExprVa
moveAbsRight(A, B);
return {A.Sec, A.ForceAbsolute, A.Val + B.getValue()};
}
+
static ExprValue sub(ExprValue A, ExprValue B) {
return {A.Sec, A.Val - B.getValue()};
}
+
static ExprValue mul(ExprValue A, ExprValue B) {
return A.getValue() * B.getValue();
}
+
static ExprValue div(ExprValue A, ExprValue B) {
if (uint64_t BV = B.getValue())
return A.getValue() / BV;
error("division by zero");
return 0;
}
+
static ExprValue leftShift(ExprValue A, ExprValue B) {
return A.getValue() << B.getValue();
}
+
static ExprValue rightShift(ExprValue A, ExprValue B) {
return A.getValue() >> B.getValue();
}
+
static ExprValue bitAnd(ExprValue A, ExprValue B) {
moveAbsRight(A, B);
return {A.Sec, A.ForceAbsolute,
(A.getValue() & B.getValue()) - A.getSecAddr()};
}
+
static ExprValue bitOr(ExprValue A, ExprValue B) {
moveAbsRight(A, B);
return {A.Sec, A.ForceAbsolute,
(A.getValue() | B.getValue()) - A.getSecAddr()};
}
+
static ExprValue bitNot(ExprValue A) { return ~A.getValue(); }
static ExprValue minus(ExprValue A) { return -A.getValue(); }
More information about the llvm-commits
mailing list