[llvm] [TableGen] Strip directories from filename prefixes. (PR #168355)
Ivan Kosarev via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 03:49:34 PST 2025
https://github.com/kosarev created https://github.com/llvm/llvm-project/pull/168355
Fixes https://github.com/llvm/llvm-project/pull/167700 to support
builds where TableGen's output file is specified as full path
rather than just filename.
>From cf78b7a189e7ffcbbdc466138d0000b82a046392 Mon Sep 17 00:00:00 2001
From: Ivan Kosarev <ivan.kosarev at amd.com>
Date: Mon, 17 Nov 2025 11:35:13 +0000
Subject: [PATCH] [TableGen] Strip directories from filename prefixes.
Fixes https://github.com/llvm/llvm-project/pull/167700 to support
builds where TableGen's output file is specified as full path
rather than just filename.
---
llvm/lib/TableGen/Main.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/TableGen/Main.cpp b/llvm/lib/TableGen/Main.cpp
index c3869c3fb9a5a..165c957fc9977 100644
--- a/llvm/lib/TableGen/Main.cpp
+++ b/llvm/lib/TableGen/Main.cpp
@@ -167,8 +167,7 @@ int llvm::TableGenMain(const char *argv0,
// Write output to memory.
Timer.startBackendTimer("Backend overall");
- SmallString<128> FilenamePrefix(OutputFilename);
- sys::path::replace_extension(FilenamePrefix, "");
+ SmallString<128> FilenamePrefix(sys::path::stem(OutputFilename));
TableGenOutputFiles OutFiles;
unsigned status = 0;
// ApplyCallback will return true if it did not apply any callback. In that
More information about the llvm-commits
mailing list