Skip to content

Commit 1761ecd

Browse files
committed
fix copy paste and update comment
1 parent c63fe05 commit 1761ecd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/TableGen/StringToOffsetTable.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- StringToOffsetTable.h - Emit a big concatenated string ---*- C++ -*-===//
1+
//===- StringToOffsetTable.cpp - Emit a big concatenated string -*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -22,7 +22,6 @@ cl::opt<bool> EmitLongStrLiterals(
2222
cl::Hidden, cl::init(true));
2323
} // end namespace llvm
2424

25-
2625
unsigned StringToOffsetTable::GetOrAddStringOffset(StringRef Str,
2726
bool appendZero) {
2827
auto [II, Inserted] = StringOffset.insert({Str, size()});
@@ -47,9 +46,10 @@ void StringToOffsetTable::EmitStringTableDef(raw_ostream &OS, const Twine &Name,
4746
Indent, Name);
4847

4948
// MSVC silently miscompiles string literals longer than 64k in some
50-
// circumstances. In this case, the build system sets EmitLongStrLiterals to
51-
// false. When that option is false and the string table is longer than 64k,
52-
// emit it as an array of character literals.
49+
// circumstances. The build system sets EmitLongStrLiterals to false when it
50+
// detects that it is targetting MSVC. When that option is false and the
51+
// string table is longer than 64k, emit it as an array of character
52+
// literals.
5353
bool UseChars = !EmitLongStrLiterals && AggregateString.size() > (64 * 1024);
5454
OS << (UseChars ? "{\n" : "\n");
5555

0 commit comments

Comments
 (0)