The comment about removeArgument seems to be outdated after
https://reviews.llvm.org/rL227345
I came across a use case where options only live in a function scope and need to
be unregistered before destruction, and It seems that removeArgument works
fine now after https://reviews.llvm.org/rL227345