mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Use array_lengthof instead of sizeof(array)/sizeof(element) in a tablegen output.
llvm-svn: 222410
This commit is contained in:
parent
b78ee81286
commit
ca7045d052
@ -379,9 +379,9 @@ RegisterInfoEmitter::EmitRegMappingTables(raw_ostream &OS,
|
||||
OS << "extern const unsigned " << Namespace
|
||||
<< (j == 0 ? "DwarfFlavour" : "EHFlavour") << i << "Dwarf2LSize";
|
||||
if (!isCtor)
|
||||
OS << " = sizeof(" << Namespace
|
||||
OS << " = array_lengthof(" << Namespace
|
||||
<< (j == 0 ? "DwarfFlavour" : "EHFlavour") << i
|
||||
<< "Dwarf2L)/sizeof(MCRegisterInfo::DwarfLLVMRegPair);\n\n";
|
||||
<< "Dwarf2L);\n\n";
|
||||
else
|
||||
OS << ";\n\n";
|
||||
}
|
||||
@ -427,9 +427,8 @@ RegisterInfoEmitter::EmitRegMappingTables(raw_ostream &OS,
|
||||
OS << "extern const unsigned " << Namespace
|
||||
<< (j == 0 ? "DwarfFlavour" : "EHFlavour") << i << "L2DwarfSize";
|
||||
if (!isCtor)
|
||||
OS << " = sizeof(" << Namespace
|
||||
<< (j == 0 ? "DwarfFlavour" : "EHFlavour") << i
|
||||
<< "L2Dwarf)/sizeof(MCRegisterInfo::DwarfLLVMRegPair);\n\n";
|
||||
OS << " = array_lengthof(" << Namespace
|
||||
<< (j == 0 ? "DwarfFlavour" : "EHFlavour") << i << "L2Dwarf);\n\n";
|
||||
else
|
||||
OS << ";\n\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user