diff options
author | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2018-03-17 13:31:35 +0000 |
---|---|---|
committer | Oren Ben Simhon <oren.ben.simhon@intel.com> | 2018-03-17 13:31:35 +0000 |
commit | 220671a0806426051a5b565cd525bce56dc2d142 (patch) | |
tree | 12c7cf206645be6194b6185a218c42d53675be14 /clang/lib/AST/ASTContext.cpp | |
parent | fdd72fd5225dedb4431473fb3ac7b3d45fc8ed00 (diff) | |
download | bcm5719-llvm-220671a0806426051a5b565cd525bce56dc2d142.tar.gz bcm5719-llvm-220671a0806426051a5b565cd525bce56dc2d142.zip |
Adding nocf_check attribute for cf-protection fine tuning
The patch adds nocf_check target independent attribute for disabling checks that were enabled by cf-protection flag.
The attribute can be appertained to functions and function pointers.
Attribute name follows GCC's similar attribute name.
Differential Revision: https://reviews.llvm.org/D41880
llvm-svn: 327768
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 49ac8c1423f..619af9af0af 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -8241,6 +8241,8 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs, return QualType(); if (lbaseInfo.getNoCallerSavedRegs() != rbaseInfo.getNoCallerSavedRegs()) return QualType(); + if (lbaseInfo.getNoCfCheck() != rbaseInfo.getNoCfCheck()) + return QualType(); // FIXME: some uses, e.g. conditional exprs, really want this to be 'both'. bool NoReturn = lbaseInfo.getNoReturn() || rbaseInfo.getNoReturn(); |