[llvm] [SystemZ][z/OS] yaml2obj for header and end records (PR #73859)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 02:27:20 PST 2023


================
@@ -26,12 +26,12 @@ namespace llvm {
 namespace GOFFYAML {
 
 struct FileHeader {
-  uint32_t TargetEnvironment;
-  uint32_t TargetOperatingSystem;
-  uint16_t CCSID;
-  StringRef CharacterSetName;
-  StringRef LanguageProductIdentifier;
-  uint32_t ArchitectureLevel;
+  uint32_t TargetEnvironment = 0;
+  uint32_t TargetOperatingSystem = 0;
+  uint16_t CCSID = 0;
+  StringRef CharacterSetName = "";
+  StringRef LanguageProductIdentifier = "";
----------------
jh7370 wrote:

You don't need to explicitly initialise these fields: the `StringRef` default constructor should be sufficient.

https://github.com/llvm/llvm-project/pull/73859


More information about the llvm-commits mailing list