mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add a GlobalAlias::isValidLinkage to reduce code duplication.
Thanks to Reid Kleckner for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -529,8 +529,7 @@ void Verifier::visitGlobalVariable(GlobalVariable &GV) {
|
||||
void Verifier::visitGlobalAlias(GlobalAlias &GA) {
|
||||
Assert1(!GA.getName().empty(),
|
||||
"Alias name cannot be empty!", &GA);
|
||||
Assert1(GA.hasExternalLinkage() || GA.hasLocalLinkage() ||
|
||||
GA.hasWeakLinkage() || GA.hasLinkOnceLinkage(),
|
||||
Assert1(GlobalAlias::isValidLinkage(GA.getLinkage()),
|
||||
"Alias should have external or external weak linkage!", &GA);
|
||||
Assert1(GA.getAliasee(),
|
||||
"Aliasee cannot be NULL!", &GA);
|
||||
|
Reference in New Issue
Block a user