mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
34 lines
577 B
C++
34 lines
577 B
C++
#pragma once
|
|
|
|
#include <cassert>
|
|
#include <filesystem>
|
|
#include "swift/extractor/infra/file/TargetFile.h"
|
|
|
|
namespace codeql {
|
|
|
|
class ObjectDomain {
|
|
TargetFile out;
|
|
|
|
enum class Phase {
|
|
header,
|
|
objects,
|
|
input_objects,
|
|
traps,
|
|
end,
|
|
};
|
|
|
|
Phase current{Phase::header};
|
|
|
|
public:
|
|
explicit ObjectDomain(TargetFile out);
|
|
|
|
void emitObject(const std::string& object);
|
|
void emitObjectDependency(const std::string& object);
|
|
void emitTrapDependency(const std::filesystem::path& trap);
|
|
|
|
private:
|
|
void ensurePhase(Phase phase);
|
|
};
|
|
|
|
} // namespace codeql
|