[llvm] [llvm-ml] Remove unsafe getCurrentSegmentOnly() call (PR #123355)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 13:26:44 PST 2025


MaskRay wrote:

The two commits intended to simplify MC internals.
For the gas compatible AsmParser.cpp, we have comprehensive tests and passing the testsuite gives contributors very high confidence in the patches.
I apologize if the simplification actually caused regression to MasmParser.cpp. That was not my intention.

That said, I should be honest. I am deeply concerned with the state of MasmParser.cpp.
When MasmParser.cpp was forked from AsmParser.cpp, it copied a lot of code from AsmParser.
A lot of pieces are unreachable or untested for llvm-ml.

I don't think it is reasonable to require contributors that refactor MC to understand
llvm-ml internals and make perfect judgement on whether a refactoring will regress llvm-ml or not. 
You have to write tests to guard against regressions.


https://github.com/llvm/llvm-project/pull/123355


More information about the llvm-commits mailing list