[PATCH] D17664: Move discriminator assignment to the right place.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 16:37:55 PST 2016


danielcdh added a comment.

It was mentioned in the FIXME comment I just removed:

- // FIXME: This seems completely wrong.
- //
- //  1. If two modules are generated in the same context, then the second
- //     Module will get different discriminators than it would have if it were
- //     generated in its own context.
- //  2. If this function is called after round-tripping to bitcode instead of
- //     before, it will give a different (and potentially incorrect!) return.
- //
- // The discriminator should instead be calculated from local information
- // where it's actually needed.  This logic should be moved to
- // AddDiscriminators::runOnFunction(), where it doesn't pollute the
- // LLVMContext.




http://reviews.llvm.org/D17664





More information about the llvm-commits mailing list