diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-02-01 20:16:42 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-02-01 20:16:42 +0000 |
commit | 31310a21fb2a9f13950f864f681c86080b05d5b2 (patch) | |
tree | 38d3c90c066260cc56b899305d21f9c702b3e74f /lib/CodeGen/CodeGenModule.cpp | |
parent | 21b91a35fb95d7a8b5bdc8634ff8f2231e4d0a1c (diff) |
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 1773b41835..84a3c318e5 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -979,7 +979,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { QualType ASTTy = D->getType(); bool NonConstInit = false; - const Expr *InitExpr = D->getDefinition(); + const Expr *InitExpr = D->getAnyInitializer(); if (!InitExpr) { // This is a tentative definition; tentative definitions are |