Skip to content

Commit

Permalink
Fix llvm3.3 build. Document change to code_llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Apr 7, 2015
1 parent b0c5b40 commit d593ac7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ Library improvements
* `lock` and `unlock` which operate on `ReentrantLock`. Useful to lock a stream during
concurrent writes from multiple tasks

* `code_llvm` now outputs stripped IR without debug info or other attached metadata.
Use `code_llvm_raw` for the unstripped output ([#10747]).

Deprecated or removed
---------------------
Expand Down
2 changes: 2 additions & 0 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,8 @@ Internals

Prints the LLVM bitcodes generated for running the method matching the given generic function and type signature to :const:`STDOUT`.

All metadata and dbg.* calls are removed from the printed bitcode. Use code_llvm_raw for the full IR.

.. function:: @code_llvm

Evaluates the arguments to the function call, determines their types, and calls :func:`code_llvm` on the resulting expression
Expand Down
2 changes: 0 additions & 2 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,6 @@ const jl_value_t *jl_dump_function_ir(void *f, bool strip_ir_metadata)
} else {
// make a copy of the function and strip metadata from the copy
llvm::ValueToValueMapTy VMap;
std::vector<Instruction> dbgInsts;
Function* f2 = llvm::CloneFunction(llvmf, VMap, false);
Function::BasicBlockListType::iterator f2_bb = f2->getBasicBlockList().begin();
// iterate over all basic blocks in the function
Expand All @@ -987,7 +986,6 @@ const jl_value_t *jl_dump_function_ir(void *f, bool strip_ir_metadata)
}
}
}

f2->print(stream);
delete f2;
}
Expand Down

0 comments on commit d593ac7

Please sign in to comment.