[llvm] r352810 - Fixed hasLinkerPrivateGlobalPrefix treating StringRef as C String.
Wouter van Oortmerssen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 31 15:03:48 PST 2019
Author: aardappel
Date: Thu Jan 31 15:03:48 2019
New Revision: 352810
URL: http://llvm.org/viewvc/llvm-project?rev=352810&view=rev
Log:
Fixed hasLinkerPrivateGlobalPrefix treating StringRef as C String.
Reviewers: jgravelle-google, sbc100
Subscribers: aheejin, llvm-commits
Differential Revision: https://reviews.llvm.org/D57545
Modified:
llvm/trunk/include/llvm/MC/MCAsmInfo.h
Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=352810&r1=352809&r2=352810&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Thu Jan 31 15:03:48 2019
@@ -491,7 +491,7 @@ public:
StringRef getPrivateLabelPrefix() const { return PrivateLabelPrefix; }
bool hasLinkerPrivateGlobalPrefix() const {
- return LinkerPrivateGlobalPrefix[0] != '\0';
+ return !LinkerPrivateGlobalPrefix.empty();
}
StringRef getLinkerPrivateGlobalPrefix() const {
More information about the llvm-commits
mailing list