diff options
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 8239775..4969809 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1403,7 +1403,7 @@ void ModuleBitcodeWriter::writeModuleInfo() {      // GLOBALVAR: [strtab offset, strtab size, type, isconst, initid,      //             linkage, alignment, section, visibility, threadlocal,      //             unnamed_addr, externally_initialized, dllstorageclass, -    //             comdat, attributes, DSO_Local, GlobalSanitizer] +    //             comdat, attributes, DSO_Local, GlobalSanitizer, code_model]      Vals.push_back(addToStrtab(GV.getName()));      Vals.push_back(GV.getName().size());      Vals.push_back(VE.getTypeID(GV.getValueType())); @@ -1420,7 +1420,7 @@ void ModuleBitcodeWriter::writeModuleInfo() {          GV.isExternallyInitialized() ||          GV.getDLLStorageClass() != GlobalValue::DefaultStorageClass ||          GV.hasComdat() || GV.hasAttributes() || GV.isDSOLocal() || -        GV.hasPartition() || GV.hasSanitizerMetadata()) { +        GV.hasPartition() || GV.hasSanitizerMetadata() || GV.getCodeModel()) {        Vals.push_back(getEncodedVisibility(GV));        Vals.push_back(getEncodedThreadLocalMode(GV));        Vals.push_back(getEncodedUnnamedAddr(GV)); @@ -1438,6 +1438,7 @@ void ModuleBitcodeWriter::writeModuleInfo() {        Vals.push_back((GV.hasSanitizerMetadata() ? serializeSanitizerMetadata(                                                        GV.getSanitizerMetadata())                                                  : 0)); +      Vals.push_back(GV.getCodeModelRaw());      } else {        AbbrevToUse = SimpleGVarAbbrev;      }  | 
