[PATCH] D103048: [IR] make -stack-alignment= into a module attr

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 2 22:43:00 PDT 2021


tejohnson added a comment.
Herald added a subscriber: ormris.

> Curiously, using ModFlagBehavior::Error doesn't error if one of two modules being linked together doesn't have such a module level attribute.

Yeah, there's a Require behavior, but that only allows you to specify what the value should be after linking modules. Barring changing the behavior of Error, which I'm guessing is relied upon too many places, the main thing I can think of is to add a new module flag behavior with tbd name that is essentially like Error but treats a module without the module flag as having a conflicting value and issues an error for that as well.



================
Comment at: llvm/test/Linker/stack-alignment.ll:11
+;--- main.ll
+; NONE: error: linking module flags 'override-stack-alignment': IDs have conflicting values
+; CHECK-16: error: linking module flags 'override-stack-alignment': IDs have conflicting values
----------------
Will you get this error currently? I thought per comment and behavior of Error that it shouldn't give an error.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103048/new/

https://reviews.llvm.org/D103048



More information about the llvm-commits mailing list