diff options
| author | 2017-03-14 08:07:52 +0000 | |
|---|---|---|
| committer | 2017-03-14 08:07:52 +0000 | |
| commit | 1cb66ada17adf0954eaadba4d02ec2470365a3ac (patch) | |
| tree | 521159d8f39562a43fffd680147eb5a71709b9b1 /gnu/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
| parent | Mark the sshd_config UsePrivilegeSeparation option as deprecated, (diff) | |
| download | wireguard-openbsd-1cb66ada17adf0954eaadba4d02ec2470365a3ac.tar.xz wireguard-openbsd-1cb66ada17adf0954eaadba4d02ec2470365a3ac.zip | |
Import LLVM 4.0.0 release including clang and lld.
Diffstat (limited to 'gnu/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
| -rw-r--r-- | gnu/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/gnu/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 9ca646534e2..996c95bd5f0 100644 --- a/gnu/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/gnu/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5832,6 +5832,15 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee, const Value *SwiftErrorVal = nullptr; const TargetLowering &TLI = DAG.getTargetLoweringInfo(); + + // We can't tail call inside a function with a swifterror argument. Lowering + // does not support this yet. It would have to move into the swifterror + // register before the call. + auto *Caller = CS.getInstruction()->getParent()->getParent(); + if (TLI.supportSwiftError() && + Caller->getAttributes().hasAttrSomewhere(Attribute::SwiftError)) + isTailCall = false; + for (ImmutableCallSite::arg_iterator i = CS.arg_begin(), e = CS.arg_end(); i != e; ++i) { const Value *V = *i; |
