diff options
Diffstat (limited to 'llvm/lib/LTO/ThinLTOCodeGenerator.cpp')
| -rw-r--r-- | llvm/lib/LTO/ThinLTOCodeGenerator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp index b17ec2e916c..a99c6e4cf73 100644 --- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -41,6 +41,11 @@ using namespace llvm; +namespace llvm { +// Flags -discard-value-names, defined in LTOCodeGenerator.cpp +extern cl::opt<bool> LTODiscardValueNames; +} + namespace { static cl::opt<int> ThreadCount("threads", @@ -361,6 +366,7 @@ void ThinLTOCodeGenerator::run() { for (auto &ModuleBuffer : Modules) { Pool.async([&](int count) { LLVMContext Context; + Context.setDiscardValueNames(LTODiscardValueNames); // Parse module now auto TheModule = loadModuleFromBuffer(ModuleBuffer, Context, false); |

