summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ISelLowering.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2016-04-08 20:46:09 +0000
committerHans Wennborg <hans@hanshq.net>2016-04-08 20:46:09 +0000
commite25b65bdb77d89c6dc26bf217c2673e43bdf8ab2 (patch)
tree2273d32ae227fcb47933adffcf34885ffac76627 /llvm/lib/Target/X86/X86ISelLowering.cpp
parent74ff7706702616710810fc9ebbaf28346ea0d50a (diff)
downloadbcm5719-llvm-e25b65bdb77d89c6dc26bf217c2673e43bdf8ab2.tar.gz
bcm5719-llvm-e25b65bdb77d89c6dc26bf217c2673e43bdf8ab2.zip
Rangeify a loop. NFC.
llvm-svn: 265846
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 2bc5f2a06fd..4c2e54f8102 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -16794,12 +16794,11 @@ X86TargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op,
// The 64 bit implementation of segmented stacks needs to clobber both r10
// r11. This makes it impossible to use it along with nested parameters.
const Function *F = MF.getFunction();
-
- for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end();
- I != E; ++I)
- if (I->hasNestAttr())
+ for (const auto &A : F->args()) {
+ if (A.hasNestAttr())
report_fatal_error("Cannot use segmented stacks with functions that "
"have nested arguments.");
+ }
}
const TargetRegisterClass *AddrRegClass = getRegClassFor(SPTy);
OpenPOWER on IntegriCloud