Skip to content

Commit 07c35c1

Browse files
committed
assert
1 parent df45e54 commit 07c35c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4755,6 +4755,8 @@ void ASTWriter::AddString(StringRef Str, RecordDataImpl &Record) {
47554755
}
47564756

47574757
bool ASTWriter::PreparePathForOutput(SmallVectorImpl<char> &Path) {
4758+
assert(WritingAST && "can't prepare path for output when not writing AST");
4759+
47584760
// Leave special file names as they are.
47594761
StringRef PathStr(Path.data(), Path.size());
47604762
if (PathStr == "<built-in>" || PathStr == "<command line>")

0 commit comments

Comments
 (0)