From 2824dc95b988f5dbdeefb37553199f03da964501 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Thu, 31 Jan 2019 23:03:48 +0000 Subject: [PATCH] Fixed hasLinkerPrivateGlobalPrefix treating StringRef as C String. Reviewers: jgravelle-google, sbc100 Subscribers: aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D57545 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352810 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCAsmInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index c7e5c9f1477..e861df5bb3d 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -491,7 +491,7 @@ public: StringRef getPrivateLabelPrefix() const { return PrivateLabelPrefix; } bool hasLinkerPrivateGlobalPrefix() const { - return LinkerPrivateGlobalPrefix[0] != '\0'; + return !LinkerPrivateGlobalPrefix.empty(); } StringRef getLinkerPrivateGlobalPrefix() const { -- 2.50.1