mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Use array_lengthof instead of sizeof(array)/sizeof(element) in a tablegen output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
88dc43f69e
commit
8a3ec67879
@ -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…
x
Reference in New Issue
Block a user