mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
- The extract tool now is sure to extract the function implementation for
the specified name instead of extracting the prototype if both exist. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4045 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,7 +38,13 @@ struct FunctionExtractorPass : public Pass {
|
|||||||
// functions that are not the named function.
|
// functions that are not the named function.
|
||||||
for (Module::iterator I = M.begin(), E = M.end(); I != E;)
|
for (Module::iterator I = M.begin(), E = M.end(); I != E;)
|
||||||
// Check to see if this is the named function!
|
// Check to see if this is the named function!
|
||||||
if (!Named && I->getName() == ExtractFunc) {
|
if (I->getName() == ExtractFunc && !I->isExternal()) {
|
||||||
|
if (Named) { // Two functions, same name?
|
||||||
|
std::cerr << "extract ERROR: Two functions named: '" << ExtractFunc
|
||||||
|
<< "' found!\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Yes, it is. Keep track of it...
|
// Yes, it is. Keep track of it...
|
||||||
Named = I;
|
Named = I;
|
||||||
|
|
||||||
|
@@ -38,7 +38,13 @@ struct FunctionExtractorPass : public Pass {
|
|||||||
// functions that are not the named function.
|
// functions that are not the named function.
|
||||||
for (Module::iterator I = M.begin(), E = M.end(); I != E;)
|
for (Module::iterator I = M.begin(), E = M.end(); I != E;)
|
||||||
// Check to see if this is the named function!
|
// Check to see if this is the named function!
|
||||||
if (!Named && I->getName() == ExtractFunc) {
|
if (I->getName() == ExtractFunc && !I->isExternal()) {
|
||||||
|
if (Named) { // Two functions, same name?
|
||||||
|
std::cerr << "extract ERROR: Two functions named: '" << ExtractFunc
|
||||||
|
<< "' found!\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Yes, it is. Keep track of it...
|
// Yes, it is. Keep track of it...
|
||||||
Named = I;
|
Named = I;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user