diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-04-09 08:18:08 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-04-09 08:18:08 +0000 |
commit | a49218e17bcbb1acde0245773173e2c0c42f4f19 (patch) | |
tree | 737b5fa7ae7c8d440c2f71d7c8d891467b2bc14b /lib/AST/ASTContext.cpp | |
parent | b6006696358572a668d6de773af8f550e54259bf (diff) |
PR8369: make __attribute((regparm(0))) work correctly. Original patch by
pageexec@freemail.hu, tweaks by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 39229a7b73..420fcd398d 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -5175,6 +5175,8 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs, return QualType(); // Regparm is part of the calling convention. + if (lbaseInfo.getHasRegParm() != rbaseInfo.getHasRegParm()) + return QualType(); if (lbaseInfo.getRegParm() != rbaseInfo.getRegParm()) return QualType(); @@ -5187,6 +5189,7 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs, allRTypes = false; FunctionType::ExtInfo einfo(NoReturn, + lbaseInfo.getHasRegParm(), lbaseInfo.getRegParm(), lbaseInfo.getCC()); |