While I agree with your point about the approach being limited, I don't think we should modify frontend just because we don't like something in it. Changing dmdfe must be considered to be a last resort when all other options are failed. In that particular case, the change to the frontend for the sake of flexibility does not seem to be absolutely necessary and could be easily avoided (ergo, it should be avoided)
And, by the way, `targetTriple` is not going anywhere, still available and can be used inside `#if IN_LLVM` block.