Local static variables must be available module-wise
as they are accessible in static methods in a class local to the same function. Fixes PR6769. llvm-svn: 101756
This commit is contained in:
@@ -133,6 +133,7 @@ class CodeGenModule : public BlockModule {
|
||||
|
||||
llvm::StringMap<llvm::Constant*> CFConstantStringMap;
|
||||
llvm::StringMap<llvm::Constant*> ConstantStringMap;
|
||||
llvm::DenseMap<const Decl*, llvm::Value*> StaticLocalDeclMap;
|
||||
|
||||
/// CXXGlobalInits - Global variables with initializers that need to run
|
||||
/// before main.
|
||||
@@ -170,6 +171,14 @@ public:
|
||||
/// been configured.
|
||||
bool hasObjCRuntime() { return !!Runtime; }
|
||||
|
||||
llvm::Value *getStaticLocalDeclMap(const VarDecl *VD) {
|
||||
return StaticLocalDeclMap[VD];
|
||||
}
|
||||
void setStaticLocalDeclMap(const VarDecl *D,
|
||||
llvm::GlobalVariable *GV) {
|
||||
StaticLocalDeclMap[D] = GV;
|
||||
}
|
||||
|
||||
CGDebugInfo *getDebugInfo() { return DebugInfo; }
|
||||
ASTContext &getContext() const { return Context; }
|
||||
const CodeGenOptions &getCodeGenOpts() const { return CodeGenOpts; }
|
||||
|
||||
Reference in New Issue
Block a user