aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorHarald van Dijk <harald.vandijk@codeplay.com>2025-07-15 23:49:52 +0100
committerGitHub <noreply@github.com>2025-07-15 23:49:52 +0100
commit66e707ec68d6dc8d8f70083b68daf52559a862c1 (patch)
tree8c0ed6cca495c81004107b72cf5b9c5a284c6531 /clang/lib/Sema/SemaLookup.cpp
parent3b41e4d4b5e57e4dc1a48a55f3bb683227863d81 (diff)
downloadllvm-66e707ec68d6dc8d8f70083b68daf52559a862c1.zip
llvm-66e707ec68d6dc8d8f70083b68daf52559a862c1.tar.gz
llvm-66e707ec68d6dc8d8f70083b68daf52559a862c1.tar.bz2
[NFC] Remove getDefaultCallingConvention IsBuiltin (#145904)
ASTContext::getDefaultCallingConvention() was documented as returning "the default calling convention for the current target", but did not do this, and was never intended to do this, it has always been controlled by command-line options to deviate from the target default. This commit changes ASTContext::getDefaultCallingConvention() to reflect the fact that it returns the context's default calling convention, not the target's default calling convention. The IsBuiltin parameter, which was used to return the target's default calling convention rather than the context's, is removed in favor of getTargetInfo().getDefaultCallingConv() which is more explicit of the intent.
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index aa7191d..6d6e07a 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -22,6 +22,7 @@
#include "clang/AST/ExprCXX.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/LangOptions.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/ModuleLoader.h"
#include "clang/Lex/Preprocessor.h"
@@ -777,7 +778,7 @@ static void GetOpenCLBuiltinFctOverloads(
std::vector<QualType> &FunctionList, SmallVector<QualType, 1> &RetTypes,
SmallVector<SmallVector<QualType, 1>, 5> &ArgTypes) {
FunctionProtoType::ExtProtoInfo PI(
- Context.getDefaultCallingConvention(false, false, true));
+ Context.getTargetInfo().getDefaultCallingConv());
PI.Variadic = false;
// Do not attempt to create any FunctionTypes if there are no return types,