[PATCH] D113491: [HIP] Fix device stub name for Windows

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 9 10:42:36 PST 2021


tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.

LGTM in general.



================
Comment at: clang/lib/AST/MicrosoftMangle.cpp:975-976
+          llvm::SmallString<128> Buf;
+          mangleSourceName((llvm::Twine("__device_stub__") + II->getName())
+                               .toStringRef(Buf));
+        } else
----------------
Can we just use `(llvm::Twine("__device_stub__") + II->getName()).str()`? Or  `std::string("__device__stub") + II->getName().str()`  ?

`std::string` should be convertible to StringRef and using a temporary variable here is fine.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113491/new/

https://reviews.llvm.org/D113491



More information about the cfe-commits mailing list