improved fix_common_blocks
This commit is contained in:
@@ -16,12 +16,18 @@
|
||||
|
||||
struct DeclInfo // for error messages
|
||||
{
|
||||
private:
|
||||
std::string varName;
|
||||
std::string fileName;
|
||||
int lineNum;
|
||||
|
||||
public:
|
||||
DeclInfo() : varName(""), fileName(""), lineNum(0) {};
|
||||
DeclInfo(const std::string& vn, const std::string& fn, int ln) : varName(vn), fileName(fn), lineNum(ln) {};
|
||||
|
||||
const char* getVarName() const { return varName.c_str(); }
|
||||
const char* getFileName() const { return fileName.c_str(); }
|
||||
int getLineNum() const { return lineNum; }
|
||||
};
|
||||
|
||||
struct CommConstraint // TODO: add variable attributes
|
||||
@@ -42,4 +48,4 @@ struct CommConstraint // TODO: add variable attributes
|
||||
};
|
||||
|
||||
|
||||
void fixCommonBlocks(const std::map<std::string, std::vector<FuncInfo*>> allFuncInfo, const std::map<std::string, CommonBlock*> allCommonBlocks, SgProject* project);
|
||||
void fixCommonBlocks(const std::map<std::string, std::vector<FuncInfo*>>& allFuncInfo, const std::map<std::string, CommonBlock*>& allCommonBlocks, SgProject* project);
|
||||
Reference in New Issue
Block a user