File indexing completed on 2026-05-10 08:44:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_PROCESSOR_H
0010 #define LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_PROCESSOR_H
0011
0012 #include "llvm/ADT/StringMap.h"
0013 #include "llvm/ADT/StringRef.h"
0014 #include "llvm/Support/Error.h"
0015 #include "llvm/Support/raw_ostream.h"
0016
0017 #include <memory>
0018 #include <vector>
0019
0020
0021 namespace llvm {
0022
0023 class WindowsResourceProcessor {
0024 public:
0025 using PathType = SmallVector<char, 64>;
0026
0027 WindowsResourceProcessor() {}
0028
0029 void addDefine(StringRef Key, StringRef Value = StringRef()) {
0030 PreprocessorDefines.emplace_back(Key, Value);
0031 }
0032 void addInclude(const PathType &IncludePath) {
0033 IncludeList.push_back(IncludePath);
0034 }
0035 void setVerbose(bool Verbose) { IsVerbose = Verbose; }
0036 void setNullAtEnd(bool NullAtEnd) { AppendNull = NullAtEnd; }
0037
0038 Error process(StringRef InputData,
0039 std::unique_ptr<raw_fd_ostream> OutputStream);
0040
0041 private:
0042 StringRef InputData;
0043 std::vector<PathType> IncludeList;
0044 std::vector<std::pair<StringRef, StringRef>> PreprocessorDefines;
0045 bool IsVerbose, AppendNull;
0046 };
0047
0048 }
0049
0050 #endif