varungandhi-apple added a comment.

I don't know how to test this on the LLVM-side (is there a way to do it?). 
Here's the Swift side test which trips over right now (but is fixed with this 
patch) by attempting a zext from an i8 to an i1 in Swift's 
`NativeConventionSchema::mapIntoNative`.

  +++ b/test/IRGen/Inputs/atomic_bool.h
  @@ -0,0 +1 @@
  +typedef struct { _Atomic(_Bool) value; } MyAtomicBool;
  +++ b/test/IRGen/Inputs/module.modulemap
  @@ -23 +23,6 @@ module AutolinkModuleMapLink {
   }
  +
  +module AtomicBoolModule {
  +  header "atomic_bool.h"
  +  export *
  +}
  +++ b/test/IRGen/atomic_bool.swift
  @@ -0,0 +1,7 @@
  +// RUN: not --crash %target-swift-emit-ir %s -I %S/Inputs
  +
  +import AtomicBoolModule
  +
  +public func f() -> MyAtomicBool {
  +  return MyAtomicBool()
  +}


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94854/new/

https://reviews.llvm.org/D94854

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to