Skip to content

Instantly share code, notes, and snippets.

View kateinoigakukun's full-sized avatar

Yuta Saito kateinoigakukun

View GitHub Profile
// ------------------------------
// lib.swift
// ------------------------------
public struct LibX {}
public func getLibX() -> LibX { return LibX() }
public func unusedFunction() {}
diff --git a/utils/webassembly/build-toolchain.sh b/utils/webassembly/build-toolchain.sh
index fed6cfff642..d77d29251c0 100755
--- a/utils/webassembly/build-toolchain.sh
+++ b/utils/webassembly/build-toolchain.sh
@@ -1,83 +1,83 @@
#/bin/bash
set -ex
SOURCE_PATH="$(cd "$(dirname $0)/../../.." && pwd)"
UTILS_PATH="$(cd "$(dirname $0)" && pwd)"
func id<T>(_ v: T) -> T { v }
func produceError() throws {}
// throws version
func f(_ a: () throws -> Void) rethrows { try a() }
diff --git a/Sources/CRuntime/include/CRuntime.h b/Sources/CRuntime/include/CRuntime.h
index 808d4c0..f4180d9 100644
--- a/Sources/CRuntime/include/CRuntime.h
+++ b/Sources/CRuntime/include/CRuntime.h
@@ -1,15 +1,16 @@
#ifndef cruntime_h
#define cruntime_h
+__attribute__((swiftcall))
const void * _Nullable swift_getTypeByMangledNameInContext(
cmake -B "S:\build\toolchain" -G Ninja -S S:\toolchain\llvm `
-C S:\windows-swift\cmake\caches\windows-x86_64.cmake `
-C S:\windows-swift\cmake\caches\org.compnerd.dt.cmake `
-D CMAKE_BUILD_TYPE=Release `
-D LLVM_ENABLE_ASSERTIONS=YES `
-D LLVM_ENABLE_PROJECTS="clang;clang-tools-extra;cmark;swift;lldb;lld" `
-D LLVM_EXTERNAL_PROJECTS="cmark;swift" `
-D LLVM_DEFAULT_TARGET_TRIPLE="x86_64-unknown-windows-msvc" `
-D LLVM_USE_HOST_TOOLS=NO `
-D SWIFT_PATH_TO_LIBDISPATCH_SOURCE=S:\toolchain\swift-corelibs-libdispatch `
Import-Module PSReadLine
Set-PSReadlineOption -EditMode Emacs
function Activate-Git {
$env:path += ";C:\Program Files\Git\bin\"
}
function Activate-VSToolchain {
$installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationpath
Import-Module (Join-Path $installPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
diff --git a/lib/Driver/UnixToolChains.cpp b/lib/Driver/UnixToolChains.cpp
index 59f24a4eafe..4a988a05943 100644
--- a/lib/Driver/UnixToolChains.cpp
+++ b/lib/Driver/UnixToolChains.cpp
@@ -218,6 +218,16 @@ toolchains::GenericUnix::constructInvocation(const DynamicLinkJobAction &job,
Arguments.push_back("-pie");
}
+ switch (context.OI.LTOVariant) {
+ case OutputInfo::LTOKind::LLVMThin:
diff --git a/llvm/include/llvm/MC/MCInst.h b/llvm/include/llvm/MC/MCInst.h
index 360dbda58fcb..50f847456c28 100644
--- a/llvm/include/llvm/MC/MCInst.h
+++ b/llvm/include/llvm/MC/MCInst.h
@@ -36,6 +36,7 @@ class MCOperand {
kInvalid, ///< Uninitialized.
kRegister, ///< Register operand.
kImmediate, ///< Immediate operand.
+ kSFPImmediate, ///< Single-floating-point immediate operand.
kFPImmediate, ///< Floating-point immediate operand.
@kateinoigakukun
kateinoigakukun / .swift-version
Last active April 6, 2022 08:14
sNaNがSwift on wasmでバグる
wasm-DEVELOPMENT-SNAPSHOT-2020-04-01-a