Skip to content

Commit 9296b2e

Browse files
committed
Rename to IncludeGuardEmitter
1 parent cf7b2cc commit 9296b2e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

llvm/include/llvm/TableGen/CodeGenHelpers.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,15 @@ class IfDefEmitter {
3434
raw_ostream &OS;
3535
};
3636

37-
// Simple RAII helper for emitting header inclusion guard (i.e,
38-
// ifndef-define-endif).
39-
class InclusionGuardEmitter {
37+
// Simple RAII helper for emitting header include guard (ifndef-define-endif).
38+
class IncludeGuardEmitter {
4039
public:
41-
InclusionGuardEmitter(raw_ostream &OS, StringRef Name)
40+
IncludeGuardEmitter(raw_ostream &OS, StringRef Name)
4241
: Name(Name.str()), OS(OS) {
4342
OS << "#ifndef " << Name << "\n"
4443
<< "#define " << Name << "\n\n";
4544
}
46-
~InclusionGuardEmitter() { OS << "\n#endif // " << Name << "\n\n"; }
45+
~IncludeGuardEmitter() { OS << "\n#endif // " << Name << "\n"; }
4746

4847
private:
4948
std::string Name;

llvm/utils/TableGen/Basic/DirectiveEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static void emitDirectivesDecl(const RecordKeeper &Records, raw_ostream &OS) {
266266
return;
267267

268268
StringRef Lang = DirLang.getName();
269-
InclusionGuardEmitter IncGuard(OS, (Twine("LLVM_") + Lang + "_INC").str());
269+
IncludeGuardEmitter IncGuard(OS, (Twine("LLVM_") + Lang + "_INC").str());
270270

271271
OS << "#include \"llvm/ADT/ArrayRef.h\"\n";
272272

0 commit comments

Comments
 (0)