14 #ifndef LLVM_CLANG_TOOLING_REFACTOR_ATOMICCHANGE_H 15 #define LLVM_CLANG_TOOLING_REFACTOR_ATOMICCHANGE_H 20 #include "llvm/ADT/StringRef.h" 21 #include "llvm/Support/Error.h" 46 : Key(Key), FilePath(FilePath) {}
64 const std::string &
getKey()
const {
return Key; }
73 void setError(llvm::StringRef Error) { this->Error = Error; }
76 bool hasError()
const {
return !Error.empty(); }
79 const std::string &
getError()
const {
return Error; }
85 llvm::StringRef ReplacementText);
91 unsigned Length, llvm::StringRef
Text);
102 llvm::StringRef Text,
bool InsertAfter =
true);
116 return InsertedHeaders;
120 return RemovedHeaders;
126 AtomicChange(std::string Key, std::string FilePath, std::string Error,
127 std::vector<std::string> InsertedHeaders,
128 std::vector<std::string> RemovedHeaders,
133 std::string FilePath;
135 std::vector<std::string> InsertedHeaders;
136 std::vector<std::string> RemovedHeaders;
178 #endif // LLVM_CLANG_TOOLING_REFACTOR_ATOMICCHANGE_H
Defines the SourceManager interface.
Represents a character-granular source range.
Encodes a location in the source.
Dataflow Directional Tag Classes.
This class handles loading and caching of source files into memory.