not.carbon 492 B

1234567891011121314151617
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. fn Not(b: bool) -> bool {
  7. return not b;
  8. }
  9. // CHECK:STDOUT: ; ModuleID = 'not.carbon'
  10. // CHECK:STDOUT: source_filename = "not.carbon"
  11. // CHECK:STDOUT:
  12. // CHECK:STDOUT: define i1 @Not(i1 %b) {
  13. // CHECK:STDOUT: %1 = xor i1 %b, true
  14. // CHECK:STDOUT: ret i1 %1
  15. // CHECK:STDOUT: }