summaryrefslogtreecommitdiffstats
path: root/tools/bugpoint
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:30:23 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:30:23 +0000
commitf25ddd991a5601d0101602c4c263a58c7af4b8a2 (patch)
tree4cfca640904d1896e25032757a61f8959c066919 /tools/bugpoint
parent3fd58f91dd318518f7daa4ba64c0aaf31799d89b (diff)
downloadFreeBSD-src-f25ddd991a5601d0101602c4c263a58c7af4b8a2.zip
FreeBSD-src-f25ddd991a5601d0101602c4c263a58c7af4b8a2.tar.gz
Update LLVM to r96341.
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/ExtractFunction.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index 918d6a6a..70011a7 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/tools/bugpoint/ExtractFunction.cpp
@@ -323,8 +323,6 @@ llvm::SplitFunctionsOutOfModule(Module *M,
Module *BugDriver::ExtractMappedBlocksFromModule(const
std::vector<BasicBlock*> &BBs,
Module *M) {
- char *ExtraArg = NULL;
-
sys::Path uniqueFilename(OutputPrefix + "-extractblocks");
std::string ErrMsg;
if (uniqueFilename.createTemporaryFileOnDisk(true, &ErrMsg)) {
@@ -359,9 +357,8 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const
}
BlocksToNotExtractFile.close();
- const char *uniqueFN = uniqueFilename.c_str();
- ExtraArg = (char*)malloc(23 + strlen(uniqueFN));
- strcat(strcpy(ExtraArg, "--extract-blocks-file="), uniqueFN);
+ std::string uniqueFN = "--extract-blocks-file=" + uniqueFilename.str();
+ const char *ExtraArg = uniqueFN.c_str();
std::vector<const PassInfo*> PI;
std::vector<BasicBlock *> EmptyBBs; // This parameter is ignored.
@@ -370,7 +367,6 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const
if (uniqueFilename.exists())
uniqueFilename.eraseFromDisk(); // Free disk space
- free(ExtraArg);
if (Ret == 0) {
outs() << "*** Basic Block extraction failed, please report a bug!\n";
OpenPOWER on IntegriCloud