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

Eric Astor via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 14:42:11 PST 2025


================
@@ -441,6 +441,11 @@ bool COFFMasmParser::parseDirectiveOption(StringRef Directive, SMLoc Loc) {
 ///          statements
 ///      label "endproc"
 bool COFFMasmParser::parseDirectiveProc(StringRef Directive, SMLoc Loc) {
+  if (!getStreamer().getCurrentFragment()) {
+    return Error(getTok().getLoc(), "expected section directive before '" +
----------------
ericastor wrote:

Revised accordingly.

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


More information about the llvm-commits mailing list