Files
swift-mirror/lib/SIL/SILFunction.cpp
Anna Zaks c06bd83358 [SIL] Remove the last few uses of SILLocation constructor.
This also removes the constructor itself, which forces future users of
SILLocation to construct a valid location.

Swift SVN r8056
2013-09-09 22:34:05 +00:00

36 lines
1.1 KiB
C++

//===--- SILFunction.cpp - Defines the SILFunction data structure ---------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "swift/SIL/SILFunction.h"
#include "swift/SIL/SILModule.h"
using namespace swift;
SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage,
StringRef Name, SILType LoweredType,
Optional<SILLocation> Loc,
IsTransparent_t isTrans)
: ModuleAndLinkage(&Module, Linkage),
Name(Name),
LoweredType(LoweredType),
Location(Loc),
DebugScope(nullptr),
Transparent(isTrans) {
Module.functions.push_back(this);
}
SILFunction::~SILFunction() {
}
ASTContext &SILFunction::getASTContext() const {
return getModule().getASTContext();
}