From 5cbf985dcbc89fba3208e7baf8b6f488b06d3ec9 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 30 Jan 2007 20:08:39 +0000 Subject: For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid confusion with external linkage types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Verifier.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/VMCore/Verifier.cpp') diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 4f67889e9d..59be4a45a3 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -132,7 +132,7 @@ namespace { // Anonymous namespace for class visitGlobalValue(*I); // Check to make sure function prototypes are okay. - if (I->isExternal()) visitFunction(*I); + if (I->isDeclaration()) visitFunction(*I); } for (Module::global_iterator I = M.global_begin(), E = M.global_end(); @@ -274,14 +274,14 @@ namespace { // Anonymous namespace for class void Verifier::visitGlobalValue(GlobalValue &GV) { - Assert1(!GV.isExternal() || + Assert1(!GV.isDeclaration() || GV.hasExternalLinkage() || GV.hasDLLImportLinkage() || GV.hasExternalWeakLinkage(), "Global is external, but doesn't have external or dllimport or weak linkage!", &GV); - Assert1(!GV.hasDLLImportLinkage() || GV.isExternal(), + Assert1(!GV.hasDLLImportLinkage() || GV.isDeclaration(), "Global is marked as dllimport, but not external", &GV); Assert1(!GV.hasAppendingLinkage() || isa(GV), @@ -369,7 +369,7 @@ void Verifier::visitFunction(Function &F) { "Functions cannot take aggregates as arguments by value!", I); } - if (!F.isExternal()) { + if (!F.isDeclaration()) { // Verify that this function (which has a body) is not named "llvm.*". It // is not legal to define intrinsics. if (F.getName().size() >= 5) @@ -968,7 +968,7 @@ void Verifier::visitInstruction(Instruction &I) { /// void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { Function *IF = CI.getCalledFunction(); - Assert1(IF->isExternal(), "Intrinsic functions should never be defined!", IF); + Assert1(IF->isDeclaration(), "Intrinsic functions should never be defined!", IF); #define GET_INTRINSIC_VERIFIER #include "llvm/Intrinsics.gen" @@ -1070,7 +1070,7 @@ FunctionPass *llvm::createVerifierPass(VerifierFailureAction action) { // verifyFunction - Create bool llvm::verifyFunction(const Function &f, VerifierFailureAction action) { Function &F = const_cast(f); - assert(!F.isExternal() && "Cannot verify external functions"); + assert(!F.isDeclaration() && "Cannot verify external functions"); FunctionPassManager FPM(new ExistingModuleProvider(F.getParent())); Verifier *V = new Verifier(action); -- cgit v1.2.3-70-g09d2