summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CallingConvEmitter.cpp
diff options
context:
space:
mode:
authorJaved Absar <javed.absar@arm.com>2017-10-16 14:52:26 +0000
committerJaved Absar <javed.absar@arm.com>2017-10-16 14:52:26 +0000
commitdfd8e2ffd1aee3caf6aceedac3ff047cd427de60 (patch)
treefd2add6b51558119790b42c8dda9909f50218646 /llvm/utils/TableGen/CallingConvEmitter.cpp
parent42135beac86a33b3502be2837fceb73efdd0a026 (diff)
downloadbcm5719-llvm-dfd8e2ffd1aee3caf6aceedac3ff047cd427de60.tar.gz
bcm5719-llvm-dfd8e2ffd1aee3caf6aceedac3ff047cd427de60.zip
[TableGen] Simplify CallingConvEmitter.cpp. NFC.
llvm-svn: 315911
Diffstat (limited to 'llvm/utils/TableGen/CallingConvEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/CallingConvEmitter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/CallingConvEmitter.cpp b/llvm/utils/TableGen/CallingConvEmitter.cpp
index 013e9606575..d452031f885 100644
--- a/llvm/utils/TableGen/CallingConvEmitter.cpp
+++ b/llvm/utils/TableGen/CallingConvEmitter.cpp
@@ -39,21 +39,21 @@ void CallingConvEmitter::run(raw_ostream &O) {
// Emit prototypes for all of the non-custom CC's so that they can forward ref
// each other.
- for (unsigned i = 0, e = CCs.size(); i != e; ++i) {
- if (!CCs[i]->getValueAsBit("Custom")) {
- O << "static bool " << CCs[i]->getName()
+ for (Record *CC : CCs) {
+ if (!CC->getValueAsBit("Custom")) {
+ O << "static bool " << CC->getName()
<< "(unsigned ValNo, MVT ValVT,\n"
- << std::string(CCs[i]->getName().size() + 13, ' ')
+ << std::string(CC->getName().size() + 13, ' ')
<< "MVT LocVT, CCValAssign::LocInfo LocInfo,\n"
- << std::string(CCs[i]->getName().size() + 13, ' ')
+ << std::string(CC->getName().size() + 13, ' ')
<< "ISD::ArgFlagsTy ArgFlags, CCState &State);\n";
}
}
// Emit each non-custom calling convention description in full.
- for (unsigned i = 0, e = CCs.size(); i != e; ++i) {
- if (!CCs[i]->getValueAsBit("Custom"))
- EmitCallingConv(CCs[i], O);
+ for (Record *CC : CCs) {
+ if (!CC->getValueAsBit("Custom"))
+ EmitCallingConv(CC, O);
}
}
OpenPOWER on IntegriCloud