From 51a16621aae785ebee13f17840b6f4acf50145c7 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Wed, 4 Nov 2020 02:08:31 -0800 Subject: [PATCH] [sledge] Fix unintended quoting of symbol names Summary: Adding quotes is needed only to avoid clashes between LLVM integer literals and anonmous value names. Reviewed By: ngorogiannis Differential Revision: D24630527 fbshipit-source-id: 97339740c --- sledge/cli/frontend.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sledge/cli/frontend.ml b/sledge/cli/frontend.ml index aab2ee2c6..e24bd89c6 100644 --- a/sledge/cli/frontend.ml +++ b/sledge/cli/frontend.ml @@ -148,10 +148,10 @@ open struct Int.to_string name | name -> ( match Int.of_string name with - | _ -> + | Some _ -> (* escape to avoid clash with names of anonymous values *) - String.concat ~sep:"" ["\""; name; "\""] - | exception _ -> name ) ) + "\"" ^ name ^ "\"" + | None -> name ) ) in SymTbl.set sym_tbl ~key:llv ~data:(name, loc) end