Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e1cb4e703b2d
Choose a base ref
...
head repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a7bc280d2510
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Sep 9, 2016

  1. Copy the full SHA
    77c4cea View commit details
  2. Merge pull request #3275 from maiha/typeless-as-nil

    Compiler: mark LLVM return type as Nil when program ends with no typed ASTNode
    Ary Borenszweig authored Sep 9, 2016
    Copy the full SHA
    a7bc280 View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/compiler/crystal/codegen/codegen.cr
4 changes: 2 additions & 2 deletions src/compiler/crystal/codegen/codegen.cr
Original file line number Diff line number Diff line change
@@ -131,8 +131,8 @@ module Crystal
@abi = @program.target_machine.abi
@llvm_typer = @program.llvm_typer
@llvm_id = LLVMId.new(@program)
@main_ret_type = node.type
ret_type = @llvm_typer.llvm_return_type(node.type)
@main_ret_type = node.type? || @program.nil_type
ret_type = @llvm_typer.llvm_return_type(@main_ret_type)
@main = @llvm_mod.functions.add(MAIN_NAME, [LLVM::Int32, LLVM::VoidPointer.pointer], ret_type)
@main.linkage = LLVM::Linkage::Internal unless expose_crystal_main