diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 20:47:22 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 20:47:22 +0000 |
commit | ef9b9a793949469cdaa4ab6d0173136229dcab7b (patch) | |
tree | 137b30d24ba219e5e745a11abb3807a9c4964aaa /tools/bugpoint/Miscompilation.cpp | |
parent | 15468bfc22302b4f79300252425d74cd6865f8b1 (diff) | |
download | external_llvm-ef9b9a793949469cdaa4ab6d0173136229dcab7b.zip external_llvm-ef9b9a793949469cdaa4ab6d0173136229dcab7b.tar.gz external_llvm-ef9b9a793949469cdaa4ab6d0173136229dcab7b.tar.bz2 |
For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/Miscompilation.cpp')
-rw-r--r-- | tools/bugpoint/Miscompilation.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index bdbd11b..38ccf0b 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -341,9 +341,11 @@ static bool ExtractLoops(BugDriver &BD, // optimized and loop extracted module. MiscompiledFunctions.clear(); for (unsigned i = 0, e = MisCompFunctions.size(); i != e; ++i) { - Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first, - MisCompFunctions[i].second); + Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first); + assert(NewF && "Function not found??"); + assert(NewF->getFunctionType() == MisCompFunctions[i].second && + "found wrong function type?"); MiscompiledFunctions.push_back(NewF); } @@ -479,9 +481,10 @@ static bool ExtractBlocks(BugDriver &BD, MiscompiledFunctions.clear(); for (unsigned i = 0, e = MisCompFunctions.size(); i != e; ++i) { - Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first, - MisCompFunctions[i].second); + Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first); assert(NewF && "Function not found??"); + assert(NewF->getFunctionType() == MisCompFunctions[i].second && + "Function has wrong type??"); MiscompiledFunctions.push_back(NewF); } |