aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp b/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp
index 7065e78f19a2..20ebaf3578d6 100644
--- a/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp
@@ -1146,6 +1146,9 @@ void CodeGenAction::ExecuteAction() {
CI.getTargetOpts(), CI.getLangOpts(),
CI.getFrontendOpts().ShowTimers,
std::move(LinkModules), *VMContext, nullptr);
+ // PR44896: Force DiscardValueNames as false. DiscardValueNames cannot be
+ // true here because the valued names are needed for reading textual IR.
+ Ctx.setDiscardValueNames(false);
Ctx.setDiagnosticHandler(
std::make_unique<ClangDiagnosticHandler>(CodeGenOpts, &Result));