diff options
author | hrs <hrs@FreeBSD.org> | 2011-06-16 12:24:02 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2011-06-16 12:24:02 +0000 |
commit | 7afd303ca9e45353e1af220a988ddac723fde355 (patch) | |
tree | 356c3cc3903b4ba969f103c2c6ccc21fc748bdaa /contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp | |
parent | b2a6f5600367e61c439c79db2317d4619960e2ce (diff) | |
parent | cc8fba8d7c933e32931cfc80150a2ed465e70825 (diff) | |
download | FreeBSD-src-7afd303ca9e45353e1af220a988ddac723fde355.zip FreeBSD-src-7afd303ca9e45353e1af220a988ddac723fde355.tar.gz |
Merge from HEAD@222977.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp index c027375..8a1a853 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp @@ -51,6 +51,7 @@ void CodeGenFunction::EmitDecl(const Decl &D) { case Decl::ImplicitParam: case Decl::ClassTemplate: case Decl::FunctionTemplate: + case Decl::TypeAliasTemplate: case Decl::TemplateTemplateParm: case Decl::ObjCMethod: case Decl::ObjCCategory: @@ -628,15 +629,14 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { emission.Address = DeclPtr; // Emit debug info for local var declaration. - if (CGDebugInfo *DI = getDebugInfo()) { - assert(HaveInsertPoint() && "Unexpected unreachable point!"); - - DI->setLocation(D.getLocation()); - if (Target.useGlobalsForAutomaticVariables()) { - DI->EmitGlobalVariable(static_cast<llvm::GlobalVariable *>(DeclPtr), &D); - } else - DI->EmitDeclareOfAutoVariable(&D, DeclPtr, Builder); - } + if (HaveInsertPoint()) + if (CGDebugInfo *DI = getDebugInfo()) { + DI->setLocation(D.getLocation()); + if (Target.useGlobalsForAutomaticVariables()) { + DI->EmitGlobalVariable(static_cast<llvm::GlobalVariable *>(DeclPtr), &D); + } else + DI->EmitDeclareOfAutoVariable(&D, DeclPtr, Builder); + } return emission; } @@ -741,6 +741,7 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { llvm::GlobalValue::InternalLinkage, constant, Name, 0, false, 0); GV->setAlignment(alignment.getQuantity()); + GV->setUnnamedAddr(true); llvm::Value *SrcPtr = GV; if (SrcPtr->getType() != BP) |