mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
very useful; it is much more interesting to divide r-value emission into "to arguments" and "to memory" models. To that end, introduce a new structure for holding an "exploded" r-value. Swift SVN r1006
69 lines
1.8 KiB
C++
69 lines
1.8 KiB
C++
//===--- GenArray.cpp - Swift IR Generation for Array Types -----------===//
|
|
//
|
|
// 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 implements IR generation for array types in Swift. This
|
|
// includes creating the IR type as well as performing primitive array
|
|
// access operations.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "swift/AST/Types.h"
|
|
#include "swift/AST/Decl.h"
|
|
#include "llvm/DerivedTypes.h"
|
|
|
|
#include "Address.h"
|
|
#include "GenType.h"
|
|
#include "IRGenModule.h"
|
|
#include "RValue.h"
|
|
|
|
using namespace swift;
|
|
using namespace irgen;
|
|
|
|
namespace {
|
|
class ArrayTypeInfo : public TypeInfo {
|
|
public:
|
|
ArrayTypeInfo() : TypeInfo(nullptr, Size(0), Alignment(0)) {}
|
|
|
|
RValueSchema getSchema() const {
|
|
// FIXME
|
|
return RValueSchema();
|
|
}
|
|
|
|
void getExplosionSchema(ExplosionSchema &schema) const {
|
|
// FIXME
|
|
}
|
|
|
|
RValue load(IRGenFunction &IGF, Address addr) const {
|
|
// FIXME
|
|
return RValue();
|
|
}
|
|
|
|
void store(IRGenFunction &CGF, const RValue &rvalue, Address addr) const {
|
|
// FIXME
|
|
}
|
|
|
|
void loadExplosion(IRGenFunction &IGF, Address addr, Explosion &explosion) const {
|
|
// FIXME
|
|
}
|
|
|
|
void storeExplosion(IRGenFunction &IGF, Explosion &explosion, Address addr) const {
|
|
// FIXME
|
|
}
|
|
};
|
|
}
|
|
|
|
const TypeInfo *
|
|
TypeConverter::convertArrayType(IRGenModule &IGM, ArrayType *T) {
|
|
// FIXME
|
|
return new ArrayTypeInfo();
|
|
}
|