[PATCH] Use yaml::IO in yaml2obj.cpp

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Apr 2 16:59:33 PDT 2013


On 2 April 2013 14:29, Alex Rosenberg <alexr at leftfield.org> wrote:
>
>
> ================
> Comment at: utils/yaml2obj/yaml2obj.cpp:244
> @@ -667,5 +243,3 @@
>    bool parse() {
> -    yaml::Document &D = *YS.begin();
> -    yaml::MappingNode *Root = dyn_cast<yaml::MappingNode>(D.getRoot());
> -    if (!Root) {
> -      YS.printError(D.getRoot(), "Root node must be a map");
> +    Header.Machine = Obj.HeaderData.Machine;
> +    if (!parseSections())
> ----------------
> Not parsing the characteristics form Header?


I just inlined the function. It became trivial once the actual parsing
was done by yaml::IO.

Cheers,
Rafael



More information about the llvm-commits mailing list