From 8d596d31820b65ea5225155ff22dc14b3df99986 Mon Sep 17 00:00:00 2001 From: Isaiah Norton Date: Mon, 6 Apr 2015 11:03:51 -0400 Subject: [PATCH] Fix llvm3.3 build. Add _llvm change note. Add NEWS entry. --- NEWS.md | 2 ++ src/codegen.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index aef9a92c22ae6b..6354c385ca1611 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 --------------------- diff --git a/src/codegen.cpp b/src/codegen.cpp index e28fe73756e422..9e56af9ce972ce 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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 dbgInsts; Function* f2 = llvm::CloneFunction(llvmf, VMap, false); Function::BasicBlockListType::iterator f2_bb = f2->getBasicBlockList().begin(); // iterate over all basic blocks in the function @@ -987,7 +986,8 @@ const jl_value_t *jl_dump_function_ir(void *f, bool strip_ir_metadata) } } } - + stream << "; NOTE: Instruction metadata and dbg.* calls have been removed.\n"; + stream << "; Use Base.code_llvm_raw for full IR.\n"; f2->print(stream); delete f2; }