mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Check that we don't have external varaibles with internal linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4051 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08c0e6af4f
commit
61b91bc156
@ -25,7 +25,7 @@
|
|||||||
// * Verify that a function's argument list agrees with it's declared type.
|
// * Verify that a function's argument list agrees with it's declared type.
|
||||||
// . Verify that arrays and structures have fixed elements: No unsized arrays.
|
// . Verify that arrays and structures have fixed elements: No unsized arrays.
|
||||||
// * It is illegal to specify a name for a void value.
|
// * It is illegal to specify a name for a void value.
|
||||||
// * It is illegal to have a internal function that is just a declaration
|
// * It is illegal to have a internal global value with no intitalizer
|
||||||
// * It is illegal to have a ret instruction that returns a value that does not
|
// * It is illegal to have a ret instruction that returns a value that does not
|
||||||
// agree with the function return value type.
|
// agree with the function return value type.
|
||||||
// * Function call argument types match the function prototype
|
// * Function call argument types match the function prototype
|
||||||
@ -98,6 +98,10 @@ namespace { // Anonymous namespace for class
|
|||||||
if (I->isExternal() && I->hasInternalLinkage())
|
if (I->isExternal() && I->hasInternalLinkage())
|
||||||
CheckFailed("Function Declaration has Internal Linkage!", I);
|
CheckFailed("Function Declaration has Internal Linkage!", I);
|
||||||
|
|
||||||
|
for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I)
|
||||||
|
if (I->isExternal() && I->hasInternalLinkage())
|
||||||
|
CheckFailed("Global Variable is external with internal linkage!", I);
|
||||||
|
|
||||||
// If the module is broken, abort at this time.
|
// If the module is broken, abort at this time.
|
||||||
abortIfBroken();
|
abortIfBroken();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user