mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* Remove RegisterPreservingCC. It was unused. * Remove DefaultCC from the runtime. The distinction between C_CC and DefaultCC was unused and inconsistently applied. Separate C_CC and DefaultCC are still present in the compiler. * Remove function pointer indirection from runtime functions except those that are used by Instruments. The remaining Instruments interface is expected to change later due to function pointer liability. * Remove swift_rt_ wrappers. Function pointers are an ABI liability that we don't want, and there are better ways to get nonlazy binding if we need it. The fully custom wrappers were only needed for RegisterPreservingCC and for optimizing the Instruments function pointers.
37 lines
1.4 KiB
C++
37 lines
1.4 KiB
C++
//===--- RuntimeFnWrappersGen.h - LLVM IR Generation for runtime functions ===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Helper functions providing the LLVM IR generation for runtime entry points.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef SWIFT_RUNTIME_RUNTIMEFNWRAPPERSGEN_H
|
|
#define SWIFT_RUNTIME_RUNTIMEFNWRAPPERSGEN_H
|
|
|
|
#include "llvm/IR/Module.h"
|
|
#include "llvm/ADT/ArrayRef.h"
|
|
|
|
namespace swift {
|
|
|
|
/// Generate an llvm declaration for a runtime entry with a
|
|
/// given name, return types, argument types, attributes and
|
|
/// a calling convention.
|
|
llvm::Constant *getRuntimeFn(llvm::Module &Module,
|
|
llvm::Constant *&cache,
|
|
char const *name,
|
|
llvm::CallingConv::ID cc,
|
|
llvm::ArrayRef<llvm::Type*> retTypes,
|
|
llvm::ArrayRef<llvm::Type*> argTypes,
|
|
llvm::ArrayRef<llvm::Attribute::AttrKind> attrs);
|
|
|
|
} /* Namespace swift */
|
|
#endif
|