r299079 - Move NumRegParameters Module Flag. NFCI.
Nirav Dave via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 30 06:41:45 PDT 2017
Author: niravd
Date: Thu Mar 30 08:41:44 2017
New Revision: 299079
URL: http://llvm.org/viewvc/llvm-project?rev=299079&view=rev
Log:
Move NumRegParameters Module Flag. NFCI.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=299079&r1=299078&r2=299079&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Mar 30 08:41:44 2017
@@ -159,12 +159,6 @@ CodeGenModule::CodeGenModule(ASTContext
// CoverageMappingModuleGen object.
if (CodeGenOpts.CoverageMapping)
CoverageMapping.reset(new CoverageMappingModuleGen(*this, *CoverageInfo));
-
- // Record mregparm value now so it is visible through rest of codegen.
- if (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
- getModule().addModuleFlag(llvm::Module::Error, "NumRegisterParameters",
- CodeGenOpts.NumRegisterParameters);
-
}
CodeGenModule::~CodeGenModule() {}
@@ -424,6 +418,11 @@ void CodeGenModule::Release() {
EmitModuleLinkOptions();
}
+ // Record mregparm value now so it is visible through rest of codegen.
+ if (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
+ getModule().addModuleFlag(llvm::Module::Error, "NumRegisterParameters",
+ CodeGenOpts.NumRegisterParameters);
+
if (CodeGenOpts.DwarfVersion) {
// We actually want the latest version when there are conflicts.
// We can change from Warning to Latest if such mode is supported.
More information about the cfe-commits
mailing list