[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 15:03:46 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL352810: Fixed hasLinkerPrivateGlobalPrefix treating StringRef as C String. (authored by aardappel, committed by ).
Herald added a project: LLVM.

Repository:
  rL LLVM

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

https://reviews.llvm.org/D57545

Files:
  llvm/trunk/include/llvm/MC/MCAsmInfo.h


Index: llvm/trunk/include/llvm/MC/MCAsmInfo.h
===================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h
+++ llvm/trunk/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.184624.patch
Type: text/x-patch
Size: 500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190131/e5ae039a/attachment.bin>


More information about the llvm-commits mailing list