diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-28 16:04:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-28 16:04:26 +0000 |
commit | 794caa1d2ccafa753fbdf23d0a50037f57635dbd (patch) | |
tree | 5c5ee8db9da54455e630e4d732ba9979405bde11 /lib/VMCore | |
parent | c6d52e07e5ecdb7f7f23b59b05d7607f5827c205 (diff) | |
download | external_llvm-794caa1d2ccafa753fbdf23d0a50037f57635dbd.zip external_llvm-794caa1d2ccafa753fbdf23d0a50037f57635dbd.tar.gz external_llvm-794caa1d2ccafa753fbdf23d0a50037f57635dbd.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 691f118..cd2aa84 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -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(); |