[Lldb-commits] [PATCH] D37420: [ABI] Rewrite RegisterIsCalleeSaved

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Sep 2 21:15:37 PDT 2017


davide added inline comments.


================
Comment at: source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1916
+  std::string Name = std::string(reg_info->name);
+  bool IsCalleeSaved = llvm::StringSwitch<bool>(Name)
+    .Cases("r12", "r13", "r14", "r15",
----------------
Currently this uses two cases as the underlying `StringSwitch` implementation allows up to 10 arguments. I have plans to switch it to use variadic templates so that this code can be rewritten to use a single case.


https://reviews.llvm.org/D37420





More information about the lldb-commits mailing list