Files
swift-mirror/include/swift/Strings.h
Dmitri Hrybenko e50b52fa02 Serializer/Driver: serialize comments to separate .swiftdoc files
The driver infers the filename from the module file by replacing the extension,
and passes the explicit path to the swiftdoc file to the frontend.  But there
is no option in the driver to control emission of swiftdoc (it is always
emitted, and name is always inferred from the swiftmodule name).

The swiftdoc file consists of a single table that maps USRs to {brief comment,
raw comment}.  In order to look up a comment for decl we generate the USR
first.  We hope that the performance hit will not be that bad, because most
declarations come from Clang.  The advantage of this design is that the
swiftdoc file is not locked to the swiftmodule file, and can be updated,
replaced, and even localized.


Swift SVN r14914
2014-03-11 10:42:26 +00:00

33 lines
1.2 KiB
C++

//===--- Strings.h - Shared string constants across components --*- 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
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_STRINGS_H
#define SWIFT_STRINGS_H
namespace swift {
/// The extension for serialized modules.
static const char SERIALIZED_MODULE_EXTENSION[] = "swiftmodule";
/// The extension for serialized documentation comments.
static const char SERIALIZED_MODULE_DOC_EXTENSION[] = "swiftdoc";
/// The extension for SIL files.
static const char SIL_EXTENSION[] = "sil";
/// The name of the standard library, which is a reserved module name.
static const char STDLIB_NAME[] = "Swift";
/// The name of the ObjectiveC module.
static const char OBJC_MODULE_NAME[] = "ObjectiveC";
/// The name of the Foundation module.
static const char FOUNDATION_MODULE_NAME[] = "Foundation";
} // end namespace swift
#endif