mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
PPCDarwinAsmPrinter::EmitStartOfAsmFile(): Add checking range in CPUDirectives[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -841,8 +841,11 @@ void PPCDarwinAsmPrinter::EmitStartOfAsmFile(Module &M) {
|
|||||||
assert(Directive <= PPC::DIR_64 && "Directive out of range.");
|
assert(Directive <= PPC::DIR_64 && "Directive out of range.");
|
||||||
|
|
||||||
// FIXME: This is a total hack, finish mc'izing the PPC backend.
|
// FIXME: This is a total hack, finish mc'izing the PPC backend.
|
||||||
if (OutStreamer.hasRawTextSupport())
|
if (OutStreamer.hasRawTextSupport()) {
|
||||||
|
assert(Directive < sizeof(CPUDirectives) / sizeof(*CPUDirectives) &&
|
||||||
|
"CPUDirectives[] might not be up-to-date!");
|
||||||
OutStreamer.EmitRawText("\t.machine " + Twine(CPUDirectives[Directive]));
|
OutStreamer.EmitRawText("\t.machine " + Twine(CPUDirectives[Directive]));
|
||||||
|
}
|
||||||
|
|
||||||
// Prime text sections so they are adjacent. This reduces the likelihood a
|
// Prime text sections so they are adjacent. This reduces the likelihood a
|
||||||
// large data or debug section causes a branch to exceed 16M limit.
|
// large data or debug section causes a branch to exceed 16M limit.
|
||||||
|
Reference in New Issue
Block a user