Skip to content

Commit af92eae

Browse files
committed
[TableGen] Strip directories from filename prefixes.
Fixes #167700 to support builds where TableGen's output file is specified as full path rather than just filename.
1 parent ad20628 commit af92eae

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/TableGen/Main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ int llvm::TableGenMain(const char *argv0,
167167

168168
// Write output to memory.
169169
Timer.startBackendTimer("Backend overall");
170-
SmallString<128> FilenamePrefix(OutputFilename);
171-
sys::path::replace_extension(FilenamePrefix, "");
170+
SmallString<128> FilenamePrefix(sys::path::stem(OutputFilename));
172171
TableGenOutputFiles OutFiles;
173172
unsigned status = 0;
174173
// ApplyCallback will return true if it did not apply any callback. In that

0 commit comments

Comments
 (0)