[PATCH] D57545: Fixed hasLinkerPrivateGlobalPrefix treating StringRef as C String.
Wouter van Oortmerssen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 31 14:41:39 PST 2019
aardappel created this revision.
aardappel added reviewers: jgravelle-google, sbc100.
Herald added subscribers: llvm-commits, aheejin.
Repository:
rL LLVM
https://reviews.llvm.org/D57545
Files:
include/llvm/MC/MCAsmInfo.h
Index: include/llvm/MC/MCAsmInfo.h
===================================================================
--- include/llvm/MC/MCAsmInfo.h
+++ include/llvm/MC/MCAsmInfo.h
@@ -491,7 +491,7 @@
StringRef getPrivateLabelPrefix() const { return PrivateLabelPrefix; }
bool hasLinkerPrivateGlobalPrefix() const {
- return LinkerPrivateGlobalPrefix[0] != '\0';
+ return !LinkerPrivateGlobalPrefix.empty();
}
StringRef getLinkerPrivateGlobalPrefix() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57545.184617.patch
Type: text/x-patch
Size: 467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190131/c2a1f625/attachment.bin>
More information about the llvm-commits
mailing list