IRBuilder: Add RAII objects to reset insertion points or fast math flags.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 30 Sep 2013 15:39:48 +0000 (15:39 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 30 Sep 2013 15:39:48 +0000 (15:39 +0000)
commitadb412daa41aef94a9f724dfd1ade9f579bb3a84
treee70185344707fc03fefd43f8b39fefb4b8005d8c
parent5a17a462cdba1b894cdd618798596076ed79c9ac
IRBuilder: Add RAII objects to reset insertion points or fast math flags.

Inspired by the object from the SLPVectorizer. This found a minor bug in the
debug loc restoration in the vectorizer where the location of a following
instruction was attached instead of the location from the original instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191673 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IRBuilder.h
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/debug_info.ll
unittests/IR/IRBuilderTest.cpp