forked from OSchip/llvm-project
Some renaming of methods, fixes typo
(related to PR6769). llvm-svn: 101794
This commit is contained in:
parent
e6a9912a76
commit
4d55b2d049
|
@ -548,7 +548,7 @@ public:
|
|||
return getStorageClass() <= Register;
|
||||
}
|
||||
|
||||
/// isStaticLocal - Returns tru if a variable with function scope is a
|
||||
/// isStaticLocal - Returns true if a variable with function scope is a
|
||||
/// static local variable.
|
||||
bool isStaticLocal() const {
|
||||
return getStorageClass() == Static && !isFileVarDecl();
|
||||
|
|
|
@ -205,7 +205,8 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D,
|
|||
// Store into LocalDeclMap before generating initializer to handle
|
||||
// circular references.
|
||||
DMEntry = GV;
|
||||
CGM.setStaticLocalDeclMap(&D, GV);
|
||||
if (getContext().getLangOptions().CPlusPlus)
|
||||
CGM.setStaticLocalDeclAddress(&D, GV);
|
||||
|
||||
// Make sure to evaluate VLA bounds now so that we have them for later.
|
||||
//
|
||||
|
|
|
@ -1106,8 +1106,9 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
|
|||
bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>();
|
||||
|
||||
llvm::Value *V = LocalDeclMap[VD];
|
||||
if (!V && VD->isStaticLocal())
|
||||
V = CGM.getStaticLocalDeclMap(VD);
|
||||
if (!V && getContext().getLangOptions().CPlusPlus &&
|
||||
VD->isStaticLocal())
|
||||
V = CGM.getStaticLocalDeclAddress(VD);
|
||||
assert(V && "DeclRefExpr not entered in LocalDeclMap?");
|
||||
|
||||
Qualifiers Quals = MakeQualifiers(E->getType());
|
||||
|
|
|
@ -171,10 +171,10 @@ public:
|
|||
/// been configured.
|
||||
bool hasObjCRuntime() { return !!Runtime; }
|
||||
|
||||
llvm::Value *getStaticLocalDeclMap(const VarDecl *VD) {
|
||||
llvm::Value *getStaticLocalDeclAddress(const VarDecl *VD) {
|
||||
return StaticLocalDeclMap[VD];
|
||||
}
|
||||
void setStaticLocalDeclMap(const VarDecl *D,
|
||||
void setStaticLocalDeclAddress(const VarDecl *D,
|
||||
llvm::GlobalVariable *GV) {
|
||||
StaticLocalDeclMap[D] = GV;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue