diff options
author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2016-12-01 18:07:38 +0000 |
---|---|---|
committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2016-12-01 18:07:38 +0000 |
commit | b0f2c33920268cccbea2d3de3b699c6fa877ee1d (patch) | |
tree | ff0938d96a62a20decdcf5f474bbce59e07bdf46 /clang/lib/CodeGen/SwiftCallingConv.cpp | |
parent | 043d9e369f0b1ab1f09f8bff1191abca3ce23099 (diff) | |
download | bcm5719-llvm-b0f2c33920268cccbea2d3de3b699c6fa877ee1d.tar.gz bcm5719-llvm-b0f2c33920268cccbea2d3de3b699c6fa877ee1d.zip |
swiftcc: Add an api to query whether a target ABI stores swifterror in a register
llvm-svn: 288394
Diffstat (limited to 'clang/lib/CodeGen/SwiftCallingConv.cpp')
-rw-r--r-- | clang/lib/CodeGen/SwiftCallingConv.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/SwiftCallingConv.cpp b/clang/lib/CodeGen/SwiftCallingConv.cpp index 1629c443652..0bfe30a32c8 100644 --- a/clang/lib/CodeGen/SwiftCallingConv.cpp +++ b/clang/lib/CodeGen/SwiftCallingConv.cpp @@ -828,3 +828,8 @@ void swiftcall::computeABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI) { argInfo.info = classifyArgumentType(CGM, argInfo.type); } } + +// Is swifterror lowered to a register by the target ABI. +bool swiftcall::isSwiftErrorLoweredInRegister(CodeGenModule &CGM) { + return getSwiftABIInfo(CGM).isSwiftErrorInRegister(); +} |