[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 4 12:33:14 PDT 2018


efriedma added inline comments.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:6589
+    std::string Reg = StrVal == "31" ? "sp" :
+                      "x" + std::string(StrVal.c_str());
+
----------------
Could you just write this as `std::string Reg = Value == 31 ? "sp" : "x" + Value.toString(10);`, and get rid of StrVal?


https://reviews.llvm.org/D52838





More information about the cfe-commits mailing list