CGExprConstant.cpp (203955) | CGExprConstant.cpp (204793) |
---|---|
1//===--- CGExprConstant.cpp - Emit LLVM Code from Constant Expressions ----===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 747 unchanged lines hidden (view full) --- 756 C = new llvm::GlobalVariable(CGM.getModule(), C->getType(), 757 E->getType().isConstant(CGM.getContext()), 758 llvm::GlobalValue::InternalLinkage, 759 C, ".compoundliteral", 0, false, 760 E->getType().getAddressSpace()); 761 return C; 762 } 763 case Expr::DeclRefExprClass: { | 1//===--- CGExprConstant.cpp - Emit LLVM Code from Constant Expressions ----===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 747 unchanged lines hidden (view full) --- 756 C = new llvm::GlobalVariable(CGM.getModule(), C->getType(), 757 E->getType().isConstant(CGM.getContext()), 758 llvm::GlobalValue::InternalLinkage, 759 C, ".compoundliteral", 0, false, 760 E->getType().getAddressSpace()); 761 return C; 762 } 763 case Expr::DeclRefExprClass: { |
764 NamedDecl *Decl = cast<DeclRefExpr>(E)->getDecl(); | 764 ValueDecl *Decl = cast<DeclRefExpr>(E)->getDecl(); 765 if (Decl->hasAttr<WeakRefAttr>()) 766 return CGM.GetWeakRefReference(Decl); |
765 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(Decl)) 766 return CGM.GetAddrOfFunction(FD); 767 if (const VarDecl* VD = dyn_cast<VarDecl>(Decl)) { 768 // We can never refer to a variable with local storage. 769 if (!VD->hasLocalStorage()) { 770 if (VD->isFileVarDecl() || VD->hasExternalStorage()) 771 return CGM.GetAddrOfGlobalVar(VD); 772 else if (VD->isBlockVarDecl()) { --- 284 unchanged lines hidden --- | 767 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(Decl)) 768 return CGM.GetAddrOfFunction(FD); 769 if (const VarDecl* VD = dyn_cast<VarDecl>(Decl)) { 770 // We can never refer to a variable with local storage. 771 if (!VD->hasLocalStorage()) { 772 if (VD->isFileVarDecl() || VD->hasExternalStorage()) 773 return CGM.GetAddrOfGlobalVar(VD); 774 else if (VD->isBlockVarDecl()) { --- 284 unchanged lines hidden --- |