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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to