summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ABIInfo.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-08-26 01:04:35 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-08-26 01:04:35 +0000
commitf667ad5f984ec4ab0baccec5ddc57a2bda7a175c (patch)
treeb30d1dfbb1121dfffe4161c39ed09cb92d9e9aed /clang/lib/CodeGen/ABIInfo.h
parent63e17ebf8b8449932f57d334f25692515b36571a (diff)
downloadbcm5719-llvm-f667ad5f984ec4ab0baccec5ddc57a2bda7a175c.tar.gz
bcm5719-llvm-f667ad5f984ec4ab0baccec5ddc57a2bda7a175c.zip
Add flag to request Clang is ABI-compatible with older versions of itself
This patch adds a flag -fclang-abi-compat that can be used to request that Clang attempts to be ABI-compatible with some older version of itself. This is provided on a best-effort basis; right now, this can be used to undo the ABI change in r310401, reverting Clang to its prior C++ ABI for pass/return by value of class types affected by that change, and to undo the ABI change in r262688, reverting Clang to using integer registers rather than SSE registers for passing <1 x long long> vectors. The intent is that we will maintain this backwards compatibility path as we make ABI-breaking fixes in future. The reversion to the old behavior for r310401 is also applied to the PS4 target since that change is not part of its platform ABI (which is essentially to do whatever Clang 3.2 did). llvm-svn: 311823
Diffstat (limited to 'clang/lib/CodeGen/ABIInfo.h')
-rw-r--r--clang/lib/CodeGen/ABIInfo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ABIInfo.h b/clang/lib/CodeGen/ABIInfo.h
index e4dce2f2a00..575506da84d 100644
--- a/clang/lib/CodeGen/ABIInfo.h
+++ b/clang/lib/CodeGen/ABIInfo.h
@@ -24,6 +24,7 @@ namespace llvm {
namespace clang {
class ASTContext;
+ class CodeGenOptions;
class TargetInfo;
namespace CodeGen {
@@ -68,6 +69,7 @@ namespace swiftcall {
llvm::LLVMContext &getVMContext() const;
const llvm::DataLayout &getDataLayout() const;
const TargetInfo &getTarget() const;
+ const CodeGenOptions &getCodeGenOpts() const;
/// Return the calling convention to use for system runtime
/// functions.
OpenPOWER on IntegriCloud