[PATCH] D34387: [PATCH 2/2] Implement "probe-stack" on x86
David Majnemer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 20 12:15:37 PDT 2017
majnemer 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")) {
----------------
pcwalton wrote:
> majnemer wrote:
> > Could this be a `StringRef`?
> I originally wanted to do that, but the docs say that `StringRef`s don't have null termination, which the `addExternalSymbol` API needs. If you'd prefer to work around that in another way, let me know.
Hmm. Isn't there a liveness problem then? Symbol.c_str() is only valid until this functoin returns. addExternalSymbol doesn't make a copy of its input unless I am mistaken.
https://reviews.llvm.org/D34387
More information about the llvm-commits
mailing list