mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-28 09:31:03 +00:00
add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135164 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6c48244973
commit
97d9730a59
@ -63,9 +63,11 @@ void GlobalValue::setAlignment(unsigned Align) {
|
||||
}
|
||||
|
||||
bool GlobalValue::isDeclaration() const {
|
||||
// Globals are definitions if they have an initializer.
|
||||
if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this))
|
||||
return GV->getNumOperands() == 0;
|
||||
|
||||
// Functions are definitions if they have a body.
|
||||
if (const Function *F = dyn_cast<Function>(this))
|
||||
return F->empty();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user