[PATCH] D34386: [PATCH 1/2] Add a "probe-stack" attribute (revised)
Patrick Walton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 10:09:13 PDT 2017
pcwalton added inline comments.
================
Comment at: lib/Target/X86/X86FrameLowering.cpp:801
- const char *Symbol;
- if (Is64Bit) {
+ std::string Symbol;
+ if (MF.getFunction()->hasFnAttribute("probe-stack")) {
----------------
fhahn wrote:
> Could this be a `const std::string`? Actually I think you could also keep the type `const char *` and use `MF.getFunction()->getFnAttribute("probe-stack").getValueAsString().data()` in line 803, as you are not using any functions from std::string
I did this because `StringRef` warns that the contents don't have to be null terminated. Is there a guarantee of null termination in this specific instance?
https://reviews.llvm.org/D34386
More information about the llvm-commits
mailing list