mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
The check to see if an external function was marked internal was not reachable!
llvm-svn: 2366
This commit is contained in:
parent
d5c0eb722e
commit
600135a049
@ -69,6 +69,11 @@ namespace { // Anonymous namespace for class
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool doFinalization(Module *M) {
|
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) {
|
if (Broken) {
|
||||||
cerr << "Broken module found, compilation aborted!\n";
|
cerr << "Broken module found, compilation aborted!\n";
|
||||||
abort();
|
abort();
|
||||||
@ -135,11 +140,8 @@ void Verifier::verifySymbolTable(SymbolTable *ST) {
|
|||||||
//
|
//
|
||||||
void Verifier::visitFunction(Function *F) {
|
void Verifier::visitFunction(Function *F) {
|
||||||
if (F->isExternal()) return;
|
if (F->isExternal()) return;
|
||||||
verifySymbolTable(F->getSymbolTable());
|
|
||||||
|
|
||||||
// Check linkage of function...
|
verifySymbolTable(F->getSymbolTable());
|
||||||
Assert1(!F->isExternal() || F->hasExternalLinkage(),
|
|
||||||
"Function cannot be an 'internal' 'declare'ation!", F);
|
|
||||||
|
|
||||||
// Check function arguments...
|
// Check function arguments...
|
||||||
const FunctionType *FT = F->getFunctionType();
|
const FunctionType *FT = F->getFunctionType();
|
||||||
|
Loading…
Reference in New Issue
Block a user