Instantly share code, notes, and snippets.

View foo.md
  • fn new(P) -> Pin<P> where P: Deref, P::Target: Unpin

    • This is a safe method to construct Pin<P>, and while the existence of Pin<P> normally means that P::Target will never be moved again in the program, P::Target implements Unpin which is read "the guarantees of Pin no longer hold". As a result, the safety here is because there's no guarantees to uphold, so everything can proceed as usual.
  • unsafe fn new_unchecked(P) -> Pin<P> where P: Deref

View -
diff --git a/test/wasm/cxx-mangling.ll b/test/wasm/cxx-mangling.ll
index 0ab48748a..e1f4ea495 100644
--- a/test/wasm/cxx-mangling.ll
+++ b/test/wasm/cxx-mangling.ll
@@ -1,66 +1,68 @@
; RUN: llc -filetype=obj %s -o %t.o
; RUN: wasm-ld --export=_Z3fooi --demangle -o %t_demangle.wasm %t.o
-; RUN: obj2yaml %t_demangle.wasm | FileCheck %s
+; RUN: obj2yaml %t_demangle.wasm | FileCheck --check-prefixes=CHECK,DEMANGLE %s
; RUN: wasm-ld --export=_Z3fooi --no-demangle -o %t_nodemangle.wasm %t.o
View -
diff --git a/test/wasm/cxx-mangling.ll b/test/wasm/cxx-mangling.ll
index 0ab48748a..4ec49419b 100644
--- a/test/wasm/cxx-mangling.ll
+++ b/test/wasm/cxx-mangling.ll
@@ -1,66 +1,68 @@
; RUN: llc -filetype=obj %s -o %t.o
; RUN: wasm-ld --export=_Z3fooi --demangle -o %t_demangle.wasm %t.o
-; RUN: obj2yaml %t_demangle.wasm | FileCheck %s
+; RUN: obj2yaml %t_demangle.wasm | FileCheck --check-prefixes=COMMON,DEMANGLE %s
; RUN: wasm-ld --export=_Z3fooi --no-demangle -o %t_nodemangle.wasm %t.o
View -
diff --git a/test/wasm/cxx-mangling.ll b/test/wasm/cxx-mangling.ll
index 0ab48748a..3a3937b47 100644
--- a/test/wasm/cxx-mangling.ll
+++ b/test/wasm/cxx-mangling.ll
@@ -1,66 +1,110 @@
; RUN: llc -filetype=obj %s -o %t.o
; RUN: wasm-ld --export=_Z3fooi --demangle -o %t_demangle.wasm %t.o
-; RUN: obj2yaml %t_demangle.wasm | FileCheck %s
+; RUN: obj2yaml %t_demangle.wasm | FileCheck --check-prefix=DEMANGLE %s
; RUN: wasm-ld --export=_Z3fooi --no-demangle -o %t_nodemangle.wasm %t.o
View -
diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp
index acdb5f93f..d90609396 100644
--- a/wasm/Driver.cpp
+++ b/wasm/Driver.cpp
@@ -1,550 +1,548 @@
//===- Driver.cpp ---------------------------------------------------------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
View -
diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp
index acdb5f93f..d90609396 100644
--- a/wasm/Driver.cpp
+++ b/wasm/Driver.cpp
@@ -310,10 +310,8 @@ static void handleWeakUndefines() {
// Add a synthetic dummy for weak undefined functions. These dummies will
// be GC'd if not used as the target of any "call" instructions.
- Optional<std::string> SymName = demangleItanium(Sym->getName());
- StringRef DebugName =
View -
diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp
index acdb5f93f..d90609396 100644
--- a/wasm/Driver.cpp
+++ b/wasm/Driver.cpp
@@ -310,10 +310,8 @@ static void handleWeakUndefines() {
// Add a synthetic dummy for weak undefined functions. These dummies will
// be GC'd if not used as the target of any "call" instructions.
- Optional<std::string> SymName = demangleItanium(Sym->getName());
- StringRef DebugName =
View -
Compiling your crate to WebAssembly
Caused by: Process exited with exit code: 101: `cargo build` did not exit successfully.
stdout:
stderr:
error: failed to parse manifest at `/home/alex/code/wasm-pack-template/Cargo.toml`
Caused by:
View -
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFJErpMBEAC86oLF0fP4TzOSydXFz+WkZCHQEKtb14EbDrp8Qae3Jm5mPPMH
y5MHFt+QmCXd53rTNCZm61iKx+YcOM20hesxD66jhwqJ+JMn/do4T0aoBbX7rnId
b1+7bna3PwGYH5cdpgkd6wrDep5h/N7Rkj+85Ifyy/MiRDnPPoYNzJkgWZ9Nu0gH
tzEwXppamGJcAKgRm56kEg1fiU8kX6s39R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