mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
The check to see if an external function was marked internal was not reachable!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6d52e07e5
commit
794caa1d2c
@ -69,6 +69,11 @@ namespace { // Anonymous namespace for class
|
||||
}
|
||||
|
||||
bool doFinalization(Module *M) {
|
||||
// Scan through, checking all of the external function's linkage now...
|
||||
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
|
||||
if ((*I)->isExternal() && (*I)->hasInternalLinkage())
|
||||
CheckFailed("", "Function Declaration has Internal Linkage!", (*I));
|
||||
|
||||
if (Broken) {
|
||||
cerr << "Broken module found, compilation aborted!\n";
|
||||
abort();
|
||||
@ -135,11 +140,8 @@ void Verifier::verifySymbolTable(SymbolTable *ST) {
|
||||
//
|
||||
void Verifier::visitFunction(Function *F) {
|
||||
if (F->isExternal()) return;
|
||||
verifySymbolTable(F->getSymbolTable());
|
||||
|
||||
// Check linkage of function...
|
||||
Assert1(!F->isExternal() || F->hasExternalLinkage(),
|
||||
"Function cannot be an 'internal' 'declare'ation!", F);
|
||||
verifySymbolTable(F->getSymbolTable());
|
||||
|
||||
// Check function arguments...
|
||||
const FunctionType *FT = F->getFunctionType();
|
||||
|
Loading…
Reference in New Issue
Block a user