DiggerLin marked 2 inline comments as done.
DiggerLin added a comment.

> As an alternative (but I think adds unnecessary complexity, due to needing an 
> extra variable), you could have both tools read the environment variable into 
> a string variable, then, if the -X option is present, overwrite that 
> variable, and finally feed that string into the parsing code that converts 
> into a BitMode value. If the string is invalid, the parsing code could report 
> an error along the lines of "invalid OBJECT_MODE or -X option value".

  if I do not think it is better than my current implement, If I implement as 
your suggestion, I need another variable to recoded the where the string come 
from(from OBJECT_MODE  or -X option value). otherwise when the invalid value of 
string , how can I report it is an invalid OBJECT_MODE"  or "invalid -X option 
value"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142660

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

Reply via email to