CGExpr.cpp (204643) | CGExpr.cpp (204793) |
---|---|
1//===--- CGExpr.cpp - Emit LLVM Code from 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//===----------------------------------------------------------------------===// --- 1048 unchanged lines hidden (view full) --- 1057 } 1058 } 1059 return LValue::MakeAddr(V, CGF.MakeQualifiers(E->getType())); 1060} 1061 1062LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { 1063 const NamedDecl *ND = E->getDecl(); 1064 | 1//===--- CGExpr.cpp - Emit LLVM Code from 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//===----------------------------------------------------------------------===// --- 1048 unchanged lines hidden (view full) --- 1057 } 1058 } 1059 return LValue::MakeAddr(V, CGF.MakeQualifiers(E->getType())); 1060} 1061 1062LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { 1063 const NamedDecl *ND = E->getDecl(); 1064 |
1065 if (ND->hasAttr<WeakRefAttr>()) { 1066 const ValueDecl* VD = cast<ValueDecl>(ND); 1067 llvm::Constant *Aliasee = CGM.GetWeakRefReference(VD); 1068 1069 Qualifiers Quals = MakeQualifiers(E->getType()); 1070 LValue LV = LValue::MakeAddr(Aliasee, Quals); 1071 1072 return LV; 1073 } 1074 |
|
1065 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) { 1066 1067 // Check if this is a global variable. 1068 if (VD->hasExternalStorage() || VD->isFileVarDecl()) 1069 return EmitGlobalVarDeclLValue(*this, E, VD); 1070 1071 bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>(); 1072 --- 839 unchanged lines hidden --- | 1075 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) { 1076 1077 // Check if this is a global variable. 1078 if (VD->hasExternalStorage() || VD->isFileVarDecl()) 1079 return EmitGlobalVarDeclLValue(*this, E, VD); 1080 1081 bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>(); 1082 --- 839 unchanged lines hidden --- |