mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Move AbstractCC into SILType and make it an attribute of SILTypes for functions. Add a ConvertCCInst to represent calling convention conversions. Give SILFunctions a linkage attribute. Add logic to SILGen to calculate these attributes for SILConstants based on their attached decls. IRGen doesn't use these new attributes yet. I'll hook that up when I move mangling over. Swift SVN r4886
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
//===--- CallingConvention.h - Calling conventions --------------*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declares the interfaces for working with abstract and
|
|
// phsyical calling conventions.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_IRGEN_CALLINGCONVENTION_H
|
|
#define SWIFT_IRGEN_CALLINGCONVENTION_H
|
|
|
|
#include "llvm/IR/CallingConv.h"
|
|
|
|
namespace llvm {
|
|
class AttributeSet;
|
|
class Value;
|
|
}
|
|
|
|
namespace swift {
|
|
class ValueDecl;
|
|
enum class AbstractCC : unsigned char;
|
|
|
|
namespace irgen {
|
|
class IRGenModule;
|
|
|
|
AbstractCC getAbstractCC(ValueDecl *fn);
|
|
|
|
/// Expand an abstract calling convention into a physical convention.
|
|
llvm::CallingConv::ID expandAbstractCC(IRGenModule &IGM, AbstractCC convention);
|
|
|
|
} // end namespace irgen
|
|
} // end namespace swift
|
|
|
|
#endif
|