Skip to content

Commit

Permalink
remove svfmodule and value in svfcore (#1651)
Browse files Browse the repository at this point in the history
* remove svfmodule in dda

* remove svfmodule in saber

* remove more svfmodule

* move svfmodule to llvm

* move svfvalue to llvm
  • Loading branch information
jumormt authored Feb 10, 2025
1 parent d39256e commit 6d0d168
Show file tree
Hide file tree
Showing 59 changed files with 1,375 additions and 1,305 deletions.
2 changes: 1 addition & 1 deletion svf-llvm/include/SVF-LLVM/BreakConstantExpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifndef BREAKCONSTANTGEPS_H
#define BREAKCONSTANTGEPS_H

#include "SVFIR/SVFValue.h"
#include "SVF-LLVM/SVFValue.h"

namespace SVF
{
Expand Down
2 changes: 1 addition & 1 deletion svf-llvm/include/SVF-LLVM/CppUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifndef CPPUtil_H_
#define CPPUtil_H_

#include "SVFIR/SVFValue.h"
#include "SVF-LLVM/SVFValue.h"
#include "SVF-LLVM/BasicTypes.h"

namespace SVF
Expand Down
2 changes: 1 addition & 1 deletion svf-llvm/include/SVF-LLVM/DCHG.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "Graphs/GenericGraph.h"
#include "Graphs/CHG.h"
#include "SVF-LLVM/BasicTypes.h"
#include "SVFIR/SVFModule.h"
#include "SVF-LLVM/SVFModule.h"
#include "Util/SVFUtil.h"
#include "Util/WorkList.h"

Expand Down
2 changes: 1 addition & 1 deletion svf-llvm/include/SVF-LLVM/LLVMLoopAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LLVMLoopAnalysis
virtual ~LLVMLoopAnalysis() = default;

/// Build llvm loops based on LoopInfo analysis
virtual void buildLLVMLoops(SVFModule *mod, ICFG* icfg);
virtual void buildLLVMLoops(ICFG* icfg);

/// Start from here
virtual void build(ICFG *icfg);
Expand Down
4 changes: 2 additions & 2 deletions svf-llvm/include/SVF-LLVM/LLVMModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#define INCLUDE_SVF_FE_LLVMMODULE_H_

#include "SVF-LLVM/BasicTypes.h"
#include "SVFIR/SVFValue.h"
#include "SVFIR/SVFModule.h"
#include "SVF-LLVM/SVFValue.h"
#include "SVF-LLVM/SVFModule.h"
#include "Util/Options.h"
#include "Graphs/BasicBlockG.h"

Expand Down
2 changes: 1 addition & 1 deletion svf-llvm/include/SVF-LLVM/LLVMUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "Util/SVFUtil.h"
#include "SVF-LLVM/BasicTypes.h"
#include "SVFIR/SVFValue.h"
#include "SVF-LLVM/SVFValue.h"
#include "Util/ThreadAPI.h"

namespace SVF
Expand Down
2 changes: 1 addition & 1 deletion svf-llvm/include/SVF-LLVM/ObjTypeInference.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "Util/SVFUtil.h"
#include "SVF-LLVM/BasicTypes.h"
#include "SVFIR/SVFValue.h"
#include "SVF-LLVM/SVFValue.h"
#include "Util/ThreadAPI.h"

namespace SVF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#ifndef INCLUDE_SVFMODULE_H_
#define INCLUDE_SVFMODULE_H_

#include "SVFIR/SVFValue.h"
#include "SVF-LLVM/SVFValue.h"
#include "Util/NodeIDAllocator.h"
#include "Util/ThreadAPI.h"

Expand Down Expand Up @@ -63,8 +63,6 @@ class SVFModule

private:
static SVFModule* svfModule;
static std::string pagReadFromTxt;
std::string moduleIdentifier;
FunctionSetType FunctionSet; ///< The Functions in the module
GlobalSetType GlobalSet; ///< The Global Variables in the module
AliasSetType AliasSet; ///< The Aliases in the module
Expand All @@ -80,25 +78,6 @@ class SVFModule

~SVFModule();

static inline void setPagFromTXT(const std::string& txt)
{
pagReadFromTxt = txt;
}

inline void setModuleIdentifier(const std::string& moduleIdentifier)
{
this->moduleIdentifier = moduleIdentifier;
}

static inline std::string pagFileName()
{
return pagReadFromTxt;
}

static inline bool pagReadFromTXT()
{
return !pagReadFromTxt.empty();
}

const SVFFunction* getSVFFunction(const std::string& name);

Expand Down Expand Up @@ -182,20 +161,6 @@ class SVFModule
}
///@}

const std::string& getModuleIdentifier() const
{
if (pagReadFromTxt.empty())
{
assert(!moduleIdentifier.empty() &&
"No module found! Reading from a file other than LLVM-IR?");
return moduleIdentifier;
}
else
{
return pagReadFromTxt;
}
}

inline const FunctionSetType& getFunctionSet() const
{
return FunctionSet;
Expand Down
Loading

0 comments on commit 6d0d168

Please sign in to comment.