aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-17 14:58:09 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-17 14:58:09 +0000
commit2e1cd4264d363ca869bf37ef160902f211d21b8c (patch)
treeb4e6314529ad811be3463a668f8b4e515f66fbcc /lib/CodeGen/CGDecl.cpp
parentb8abbdc90f902a2c09c566193b900c2c45a46672 (diff)
Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index e54c4b386d..7a86d24801 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -146,7 +146,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
if (!Target.useGlobalsForAutomaticVariables()) {
// A normal fixed sized variable becomes an alloca in the entry block.
const llvm::Type *LTy = ConvertType(Ty);
- llvm::AllocaInst * Alloc = CreateTempAlloca(LTy, D.getName());
+ llvm::AllocaInst * Alloc = CreateTempAlloca(LTy, D.getIdentifierName());
unsigned align = getContext().getTypeAlign(Ty);
if (const AlignedAttr* AA = D.getAttr<AlignedAttr>())
align = std::max(align, AA->getAlignment());
@@ -164,7 +164,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
// FIXME: VLA: Add VLA support. For now just make up enough to let
// the compile go through.
const llvm::Type *LTy = ConvertType(Ty);
- llvm::AllocaInst * Alloc = CreateTempAlloca(LTy, D.getName());
+ llvm::AllocaInst * Alloc = CreateTempAlloca(LTy, D.getIdentifierName());
DeclPtr = Alloc;
}