From: Chris Lattner Date: Tue, 8 Jan 2008 04:26:20 +0000 (+0000) Subject: Fix PR1797 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4a6a6f21f3342428e5dcf28b0ddfbe0039a040e5;p=oota-llvm.git Fix PR1797 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45736 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index c3c7799e560..906826e0e5b 100644 --- a/tools/bugpoint/ExtractFunction.cpp +++ b/tools/bugpoint/ExtractFunction.cpp @@ -335,6 +335,9 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const for (std::vector::const_iterator I = BBs.begin(), E = BBs.end(); I != E; ++I) { BasicBlock *BB = *I; + // If the BB doesn't have a name, give it one so we have something to key + // off of. + if (!BB->hasName()) BB->setName("tmpbb"); BlocksToNotExtractFile << BB->getParent()->getName() << " " << BB->getName() << "\n"; }