summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-07-15 04:27:47 +0000
committerCraig Topper <craig.topper@gmail.com>2013-07-15 04:27:47 +0000
commit5871321e493670b0a440f45ba466da8713a1d8f2 (patch)
tree859b8b2dd669dfed2f574c70a933d84aef7d2637 /llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
parente5ce831c7c364180611deccef5e158a1c4fd0c09 (diff)
downloadbcm5719-llvm-5871321e493670b0a440f45ba466da8713a1d8f2.tar.gz
bcm5719-llvm-5871321e493670b0a440f45ba466da8713a1d8f2.zip
Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).
llvm-svn: 186301
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 66d94666619..55de1dcafb6 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -853,7 +853,7 @@ void PPCDarwinAsmPrinter::EmitStartOfAsmFile(Module &M) {
// FIXME: This is a total hack, finish mc'izing the PPC backend.
if (OutStreamer.hasRawTextSupport()) {
- assert(Directive < sizeof(CPUDirectives) / sizeof(*CPUDirectives) &&
+ assert(Directive < array_lengthof(CPUDirectives) &&
"CPUDirectives[] might not be up-to-date!");
OutStreamer.EmitRawText("\t.machine " + Twine(CPUDirectives[Directive]));
}
OpenPOWER on IntegriCloud