Files
swift-mirror/stdlib/private/StdlibUnittest/OpaqueIdentityFunctions.cpp
Davide Italiano 2dfd3d5b00 [Runtime] Remove dependency on Compiler.h from Config.h.
The runtime doesn't really need Compiler.h. It just needs some
visibility macros which can be inlined here instead of pulling
the whole heavyweight header (including its transitive closure,
llvm-config.h). This is becoming more important now that Compiler.h
includes C++ headers (namely, <new>), and swift/Runtime/Config.h
can be included from C or Objective-C files (causing build failures).

<rdar://problem/35860874>
2018-07-03 11:32:12 -07:00

18 lines
656 B
C++

//===--- OpaqueIdentityFunctions.cpp --------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 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
//
//===----------------------------------------------------------------------===//
#include "swift/Runtime/Config.h"
SWIFT_CC(swift) SWIFT_RUNTIME_LIBRARY_VISIBILITY extern "C"
void *getPointer(void *x) { return x; }