[llvm] r371869 - [Remarks][NFC] Use StringLiteral for magic numbers

Francis Visoiu Mistrih via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 09:46:23 PDT 2019


Author: thegameg
Date: Fri Sep 13 09:46:23 2019
New Revision: 371869

URL: http://llvm.org/viewvc/llvm-project?rev=371869&view=rev
Log:
[Remarks][NFC] Use StringLiteral for magic numbers

Modified:
    llvm/trunk/include/llvm/Remarks/BitstreamRemarkContainer.h
    llvm/trunk/include/llvm/Remarks/RemarkFormat.h

Modified: llvm/trunk/include/llvm/Remarks/BitstreamRemarkContainer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Remarks/BitstreamRemarkContainer.h?rev=371869&r1=371868&r2=371869&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Remarks/BitstreamRemarkContainer.h (original)
+++ llvm/trunk/include/llvm/Remarks/BitstreamRemarkContainer.h Fri Sep 13 09:46:23 2019
@@ -25,7 +25,7 @@ namespace remarks {
 /// Note: this is different from the version of the remark entry.
 constexpr uint64_t CurrentContainerVersion = 0;
 /// The magic number used for identifying remark blocks.
-constexpr StringRef ContainerMagic("RMRK", 4);
+constexpr StringLiteral ContainerMagic("RMRK");
 
 /// Type of the remark container.
 /// The remark container has two modes:

Modified: llvm/trunk/include/llvm/Remarks/RemarkFormat.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Remarks/RemarkFormat.h?rev=371869&r1=371868&r2=371869&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Remarks/RemarkFormat.h (original)
+++ llvm/trunk/include/llvm/Remarks/RemarkFormat.h Fri Sep 13 09:46:23 2019
@@ -19,7 +19,7 @@
 namespace llvm {
 namespace remarks {
 
-constexpr StringRef Magic("REMARKS", 7);
+constexpr StringLiteral Magic("REMARKS");
 
 /// The format used for serializing/deserializing remarks.
 enum class Format { Unknown, YAML, YAMLStrTab, Bitstream };




More information about the llvm-commits mailing list