mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Build libSwiftStaticMirror as a standalone library with minimal required dependencies.
This separates it from `libSwiftScan` and allows us to build this library without building much of the rest of the compiler. Also refactor `utils/build-parser-lib` into `utils/build-tooling-libs` which builds both SwiftSyntaxParser and SwiftStaticMirror.
This commit is contained in:
35
include/swift-c/CommonString/CommonString.h
Normal file
35
include/swift-c/CommonString/CommonString.h
Normal file
@@ -0,0 +1,35 @@
|
||||
//===--- CommonString.h - C API for Swift Dependency Scanning ---*- C -*-===//
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2014 - 2020 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
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef SWIFT_C_LIB_SWIFT_COMMON_STRING_H
|
||||
#define SWIFT_C_LIB_SWIFT_COMMON_STRING_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* A character string used to pass around dependency scan result metadata.
|
||||
* Lifetime of the string is strictly tied to the object whose field it
|
||||
* represents. When the owning object is released, string memory is freed.
|
||||
*/
|
||||
typedef struct {
|
||||
const void *data;
|
||||
size_t length;
|
||||
} swiftscan_string_ref_t;
|
||||
|
||||
typedef struct {
|
||||
swiftscan_string_ref_t *strings;
|
||||
size_t count;
|
||||
} swiftscan_string_set_t;
|
||||
|
||||
#endif // SWIFT_C_LIB_SWIFT_COMMON_STRING_H
|
||||
Reference in New Issue
Block a user