[llvm] [RuntimeDyldChecker][AArch32] Add a PC offset to next_PC for ARM targets (PR #91746)
Eymen Ünay via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 03:07:30 PDT 2024
================
@@ -354,21 +354,41 @@ class RuntimeDyldCheckerExprEval {
EvalResult(("Cannot decode unknown symbol '" + Symbol + "'").str()),
"");
+ // if there is an offset number expr
+ int64_t SymbolOffset = 0;
+ BinOpToken BinOp;
+ std::tie(BinOp, RemainingExpr) = parseBinOpToken(RemainingExpr);
+ switch (BinOp) {
+ case BinOpToken::Add: {
+ EvalResult Number;
+ std::tie(Number, RemainingExpr) = evalNumberExpr(RemainingExpr);
+ SymbolOffset = Number.getValue();
+ break;
+ }
+ case BinOpToken::Invalid:
+ break;
+ default:
+ return std::make_pair(
+ unexpectedToken(RemainingExpr, RemainingExpr,
+ "expected '+' for offset or ')' if no offset"),
+ "");
+ }
+
----------------
eymay wrote:
I was a little doubtful with adding the feature for a single case and I think you are right, this solves a problem we might not need to have. I will update the test instead.
https://github.com/llvm/llvm-project/pull/91746
More information about the llvm-commits
mailing list