LLVM  8.0.1
ResourceProcessor.h
Go to the documentation of this file.
1 //===-- ResourceProcessor.h -------------------------------------*- C++-*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===---------------------------------------------------------------------===//
9 
10 #ifndef LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_PROCESSOR_H
11 #define LLVM_INCLUDE_LLVM_SUPPORT_WINDOWS_RESOURCE_PROCESSOR_H
12 
13 #include "llvm/ADT/StringMap.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/Support/Error.h"
17 
18 #include <memory>
19 #include <vector>
20 
21 
22 namespace llvm {
23 
25 public:
27 
29 
31  PreprocessorDefines.emplace_back(Key, Value);
32  }
33  void addInclude(const PathType &IncludePath) {
34  IncludeList.push_back(IncludePath);
35  }
36  void setVerbose(bool Verbose) { IsVerbose = Verbose; }
37  void setNullAtEnd(bool NullAtEnd) { AppendNull = NullAtEnd; }
38 
39  Error process(StringRef InputData,
40  std::unique_ptr<raw_fd_ostream> OutputStream);
41 
42 private:
43  StringRef InputData;
44  std::vector<PathType> IncludeList;
45  std::vector<std::pair<StringRef, StringRef>> PreprocessorDefines;
46  bool IsVerbose, AppendNull;
47 };
48 
49 }
50 
51 #endif
void setNullAtEnd(bool NullAtEnd)
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Key
PAL metadata keys.
This is a &#39;vector&#39; (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:847
Error process(StringRef InputData, std::unique_ptr< raw_fd_ostream > OutputStream)
void addDefine(StringRef Key, StringRef Value=StringRef())
void addInclude(const PathType &IncludePath)
LLVM Value Representation.
Definition: Value.h:73
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49