[PATCH] D58724: [gnustep-objc] Make the GNUstep v2 ABI work for Windows DLLs.
Dustin L. Howett via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 10:22:27 PST 2019
DHowett-MSFT added inline comments.
================
Comment at: clang/lib/CodeGen/CGObjCGNU.cpp:188
+ Twine ManglePublicSymbol(StringRef Name) {
+ return StringRef(CGM.getTriple().isOSBinFormatCOFF() ? "$_" : "._") + Name;
----------------
As of the latest revision, this now fails at runtime:
```
0x01342976 (0x03D8D530 0x03D8DCA0 0x04045A08 0x04045A08), llvm::Twine::str() + 0x166 bytes(s), e:\src\llvm\lib\suppor
t\twine.cpp, line 29 + 0x5F byte(s)
0x01664F99 (0x03D8D5C4 0x0000000A 0x00000000 0x03D8DCA0), `anonymous namespace'::CGObjCGNUstep2::GetClassVar() + 0xB9
bytes(s), e:\src\llvm\tools\clang\lib\codegen\cgobjcgnu.cpp, line 1207 + 0x10 byte(s)
```
I believe we're running afoul of StringRef's lifetime here. I haven't had a chance to dig in.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58724/new/
https://reviews.llvm.org/D58724
More information about the cfe-commits
mailing list