[llvm-commits] [llvm] r156164 - /llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
Duncan Sands
baldrick at free.fr
Fri May 4 08:14:40 PDT 2012
Hi Chandler,
> Hoist a safety assert from the extraction method into the construction
> of the extractor itself.
>
> Modified:
> llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
>
> Modified: llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp?rev=156164&r1=156163&r2=156164&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp Fri May 4 05:26:45 2012
> @@ -67,6 +67,8 @@
> buildExtractionBlockSet(ArrayRef<BasicBlock *> BBs) {
> SetVector<BasicBlock *> Result;
>
> + assert(!BBs.empty());
no error message.
> +
> // Loop over the blocks, adding them to our set-vector, and aborting with an
> // empty set if we encounter invalid blocks.
> for (ArrayRef<BasicBlock *>::iterator I = BBs.begin(), E = BBs.end();
Ciao, Duncan.
More information about the llvm-commits
mailing list