[PATCH] cpp11-migrate: Write header replacements to disk

Edwin Vane edwin.vane at intel.com
Wed Jul 17 11:12:50 PDT 2013


  Let me explain why the order of transforms is not important for these header description files. First, observe that all replacements generated by transform A will be serialized to file before all replacements generated by transform B assuming transform A happens before transform B. Second, all replacements for all transforms for a given translation unit header are serialized to the **same file**. Therefore, the order of replacements is preserved by the order of the replacements within the file. These replacements will be read by a post-processing tool in the order they serialized and thus applied in the same order as they were generated. (at least at the granularity of a Transform. The replacements for a specific transform may not be applied in the same order as generated due to the Replacements structure being a std::set. However, this doesn't matter since Replacements in a given set are guaranteed not to conflict (I think. If they do, that's a bug unrelated to this story!
 ).

http://llvm-reviews.chandlerc.com/D1142



More information about the cfe-commits mailing list