forked from secure-software-engineering/phasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor TypeHierarchy Interface (secure-software-engineering#721)
* Split TH and VTable into two interfaces + refactor TH interface * Add vtable unittest back * Add breaking changes * minor fix * Add ctor to LLVMBasedICFG that allows passing in an LLVMVFTableProvider * minor --------- Co-authored-by: Martin Mory <[email protected]>
- Loading branch information
1 parent
24bba27
commit 59f257a
Showing
26 changed files
with
501 additions
and
1,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
include/phasar/PhasarLLVM/ControlFlow/LLVMVFTableProvider.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/****************************************************************************** | ||
* Copyright (c) 2024 Fabian Schiebel. | ||
* All rights reserved. This program and the accompanying materials are made | ||
* available under the terms of LICENSE.txt. | ||
* | ||
* Contributors: | ||
* Fabian Schiebel and others | ||
*****************************************************************************/ | ||
|
||
#ifndef PHASAR_PHASARLLVM_CONTROLFLOW_LLVMVFTABLEPROVIDER_H | ||
#define PHASAR_PHASARLLVM_CONTROLFLOW_LLVMVFTABLEPROVIDER_H | ||
|
||
#include "phasar/PhasarLLVM/TypeHierarchy/LLVMVFTable.h" | ||
|
||
#include <unordered_map> | ||
|
||
namespace llvm { | ||
class Module; | ||
class StructType; | ||
class GlobalVariable; | ||
} // namespace llvm | ||
|
||
namespace psr { | ||
class LLVMProjectIRDB; | ||
|
||
class LLVMVFTableProvider { | ||
public: | ||
explicit LLVMVFTableProvider(const llvm::Module &Mod); | ||
explicit LLVMVFTableProvider(const LLVMProjectIRDB &IRDB); | ||
|
||
[[nodiscard]] bool hasVFTable(const llvm::StructType *Type) const; | ||
[[nodiscard]] const LLVMVFTable * | ||
getVFTableOrNull(const llvm::StructType *Type) const; | ||
|
||
private: | ||
std::unordered_map<const llvm::StructType *, LLVMVFTable> TypeVFTMap; | ||
}; | ||
} // namespace psr | ||
|
||
#endif // PHASAR_PHASARLLVM_CONTROLFLOW_LLVMVFTABLEPROVIDER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.