[LLParser] Support symbolic address space numbers
This allows the LLParser to also accept "A", "G", and "P" in `addrspace` usages. "A" will be replaced by the alloca address space defined in the globals, "G" by the default globals address space and "P" by the program address space. This makes it easier to write tests that use different address space and only only vary the RUN: lines. Currently, the only alternative is to pre-process the sources with a tool such as `sed` Importantly, these new string values are only accepted in .ll files and not stored in the bitcode format, so it does not round-trip via llvm-as and llvm-dis (see newly added test). Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D138789
Loading
Please sign in to comment