clang 20.0.0git
SemaPPC.h
Go to the documentation of this file.
1//===----- SemaPPC.h ------- PPC target-specific routines -----*- C++ -*---===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8/// \file
9/// This file declares semantic analysis functions specific to PowerPC.
10///
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_SEMA_SEMAPPC_H
14#define LLVM_CLANG_SEMA_SEMAPPC_H
15
16#include "clang/AST/ASTFwd.h"
17#include "clang/AST/Type.h"
19#include "clang/Sema/SemaBase.h"
20
21namespace clang {
22class TargetInfo;
23
24class SemaPPC : public SemaBase {
25public:
26 SemaPPC(Sema &S);
27
28 bool CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
29 CallExpr *TheCall);
30 // 16 byte ByVal alignment not due to a vector member is not honoured by XL
31 // on AIX. Emit a warning here that users are generating binary incompatible
32 // code to be safe.
33 // Here we try to get information about the alignment of the struct member
34 // from the struct passed to the caller function. We only warn when the struct
35 // is passed byval, hence the series of checks and early returns if we are a
36 // not passing a struct byval.
38
39 /// BuiltinPPCMMACall - Check the call to a PPC MMA builtin for validity.
40 /// Emit an error and return true on failure; return false on success.
41 /// TypeStr is a string containing the type descriptor of the value returned
42 /// by the builtin and the descriptors of the expected type of the arguments.
43 bool BuiltinPPCMMACall(CallExpr *TheCall, unsigned BuiltinID,
44 const char *TypeDesc);
45
47
48 // Customized Sema Checking for VSX builtins that have the following
49 // signature: vector [...] builtinName(vector [...], vector [...], const int);
50 // Which takes the same type of vectors (any legal vector type) for the first
51 // two arguments and takes compile time constant for the third argument.
52 // Example builtins are :
53 // vector double vec_xxpermdi(vector double, vector double, int);
54 // vector short vec_xxsldwi(vector short, vector short, int);
55 bool BuiltinVSX(CallExpr *TheCall);
56};
57} // namespace clang
58
59#endif // LLVM_CLANG_SEMA_SEMAPPC_H
Forward declaration of all AST node types.
SourceLocation Loc
Definition: SemaObjC.cpp:759
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2830
This represents one expression.
Definition: Expr.h:110
A (possibly-)qualified type.
Definition: Type.h:941
bool CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall)
Definition: SemaPPC.cpp:96
void checkAIXMemberAlignment(SourceLocation Loc, const Expr *Arg)
Definition: SemaPPC.cpp:30
bool BuiltinPPCMMACall(CallExpr *TheCall, unsigned BuiltinID, const char *TypeDesc)
BuiltinPPCMMACall - Check the call to a PPC MMA builtin for validity.
Definition: SemaPPC.cpp:334
bool BuiltinVSX(CallExpr *TheCall)
Definition: SemaPPC.cpp:400
bool CheckPPCMMAType(QualType Type, SourceLocation TypeLoc)
Definition: SemaPPC.cpp:259
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:493
Encodes a location in the source.
Exposes information about the current target.
Definition: TargetInfo.h:218
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:59
The base class of the type hierarchy.
Definition: Type.h:1829
The JSON file list parser is used to communicate input to InstallAPI.