[llvm] 88ba56c - Revert "[MCParser] Modernize CppHashInfoTy (NFC)"

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 10 13:34:38 PDT 2023


Author: Kazu Hirata
Date: 2023-06-10T13:34:31-07:00
New Revision: 88ba56c5b834506fe1f7145ef5b459a2d3edadb8

URL: https://github.com/llvm/llvm-project/commit/88ba56c5b834506fe1f7145ef5b459a2d3edadb8
DIFF: https://github.com/llvm/llvm-project/commit/88ba56c5b834506fe1f7145ef5b459a2d3edadb8.diff

LOG: Revert "[MCParser] Modernize CppHashInfoTy (NFC)"

This reverts commit c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b.

A build error has been reported with gcc-7.

This patch fixes:

https://github.com/llvm/llvm-project/issues/63240

Added: 
    

Modified: 
    llvm/lib/MC/MCParser/MasmParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/MCParser/MasmParser.cpp b/llvm/lib/MC/MCParser/MasmParser.cpp
index 1502d70fddfb0..d522b77c25874 100644
--- a/llvm/lib/MC/MCParser/MasmParser.cpp
+++ b/llvm/lib/MC/MCParser/MasmParser.cpp
@@ -435,10 +435,10 @@ class MasmParser : public MCAsmParser {
   /// The values from the last parsed cpp hash file line comment if any.
   struct CppHashInfoTy {
     StringRef Filename;
-    int64_t LineNumber = 0;
+    int64_t LineNumber;
     SMLoc Loc;
-    unsigned Buf = 0;
-    CppHashInfoTy() = default;
+    unsigned Buf;
+    CppHashInfoTy() : LineNumber(0), Buf(0) {}
   };
   CppHashInfoTy CppHashInfo;
 


        


More information about the llvm-commits mailing list