| 1 | //===--- CIRGenPointerAuth.cpp - CIR generation for ptr auth --------------===// |
| 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 | // |
| 9 | // This file contains common routines relating to the emission of |
| 10 | // pointer authentication operations. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "CIRGenFunction.h" |
| 15 | |
| 16 | using namespace clang; |
| 17 | using namespace clang::CIRGen; |
| 18 | |
| 19 | Address CIRGenFunction::getAsNaturalAddressOf(Address addr, |
| 20 | QualType pointeeTy) { |
| 21 | assert(!cir::MissingFeatures::pointerAuthentication()); |
| 22 | return addr; |
| 23 | } |
| 24 | cir::FuncOp CIRGenModule::getFunctionPointer(GlobalDecl gd) { |
| 25 | // This should eventually get the function pointer with authentication |
| 26 | // information added. Since this is not yet implemented, this just gets the |
| 27 | // 'base' pointer right now. |
| 28 | assert(!cir::MissingFeatures::pointerAuthentication()); |
| 29 | |
| 30 | return getRawFunctionPointer(GD: gd); |
| 31 | } |
| 32 | |